diff options
Diffstat (limited to 'actionpack')
-rw-r--r-- | actionpack/README.rdoc | 2 | ||||
-rw-r--r-- | actionpack/lib/action_controller/metal/mime_responds.rb | 12 |
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| |