aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack
diff options
context:
space:
mode:
authorXavier Noria <fxn@hashref.com>2010-12-20 20:13:34 +0100
committerXavier Noria <fxn@hashref.com>2010-12-20 20:13:34 +0100
commit880f8419c41db0aea4b7cf3abd74fe5d32fa04a7 (patch)
tree0c21b8e0829136b6fb33a136caf3085f2a78c857 /actionpack
parent0cbfd6c28d327304432f7d0c067662b5c1e41a78 (diff)
parent6909fb6cff49e11574909b55864af8673d044eb7 (diff)
downloadrails-880f8419c41db0aea4b7cf3abd74fe5d32fa04a7.tar.gz
rails-880f8419c41db0aea4b7cf3abd74fe5d32fa04a7.tar.bz2
rails-880f8419c41db0aea4b7cf3abd74fe5d32fa04a7.zip
Merge branch 'master' of git://github.com/lifo/docrails
Diffstat (limited to 'actionpack')
-rw-r--r--actionpack/README.rdoc2
-rw-r--r--actionpack/lib/action_controller/metal/mime_responds.rb12
2 files changed, 7 insertions, 7 deletions
diff --git a/actionpack/README.rdoc b/actionpack/README.rdoc
index 0ad33cfe26..a28d78f688 100644
--- a/actionpack/README.rdoc
+++ b/actionpack/README.rdoc
@@ -262,7 +262,7 @@ methods:
layout "weblog/layout"
def index
- @posts = Post.find(:all)
+ @posts = Post.all
end
def show
diff --git a/actionpack/lib/action_controller/metal/mime_responds.rb b/actionpack/lib/action_controller/metal/mime_responds.rb
index 9ba37134b8..a2e06fe0a6 100644
--- a/actionpack/lib/action_controller/metal/mime_responds.rb
+++ b/actionpack/lib/action_controller/metal/mime_responds.rb
@@ -63,13 +63,13 @@ module ActionController #:nodoc:
# might look something like this:
#
# def index
- # @people = Person.find(:all)
+ # @people = Person.all
# end
#
# Here's the same action, with web-service support baked in:
#
# def index
- # @people = Person.find(:all)
+ # @people = Person.all
#
# respond_to do |format|
# format.html
@@ -155,7 +155,7 @@ module ActionController #:nodoc:
# Respond to also allows you to specify a common block for different formats by using any:
#
# def index
- # @people = Person.find(:all)
+ # @people = Person.all
#
# respond_to do |format|
# format.html
@@ -178,7 +178,7 @@ module ActionController #:nodoc:
# respond_to :html, :xml, :json
#
# def index
- # @people = Person.find(:all)
+ # @people = Person.all
# respond_with(@person)
# end
# end
@@ -208,8 +208,8 @@ module ActionController #:nodoc:
# It also accepts a block to be given. It's used to overwrite a default
# response:
#
- # def destroy
- # @user = User.find(params[:id])
+ # def create
+ # @user = User.new(params[:user])
# flash[:notice] = "User was successfully created." if @user.save
#
# respond_with(@user) do |format|