aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_controller/base.rb
diff options
context:
space:
mode:
authorPablo Ifran <pabloifran@gmail.com>2012-10-22 09:42:42 -0200
committerPablo Ifran <pabloifran@gmail.com>2012-10-22 09:42:42 -0200
commite041a50f2917f82950f9e5666f966d8992afd45d (patch)
tree9f4d2e3aa88f28dba9d7a1d24d46977e0642a1eb /actionpack/lib/action_controller/base.rb
parent3e6b2f5d38e0f31db3fb0fcd3bbab92666a0e3e2 (diff)
parentae27acb342c575ce19d5ad78cb13ba23f826fab1 (diff)
downloadrails-e041a50f2917f82950f9e5666f966d8992afd45d.tar.gz
rails-e041a50f2917f82950f9e5666f966d8992afd45d.tar.bz2
rails-e041a50f2917f82950f9e5666f966d8992afd45d.zip
Merge branch 'master' of https://github.com/lifo/docrails
Conflicts: activerecord/lib/active_record/callbacks.rb
Diffstat (limited to 'actionpack/lib/action_controller/base.rb')
-rw-r--r--actionpack/lib/action_controller/base.rb18
1 files changed, 9 insertions, 9 deletions
diff --git a/actionpack/lib/action_controller/base.rb b/actionpack/lib/action_controller/base.rb
index 6b8d9384d4..9b3bf99fc3 100644
--- a/actionpack/lib/action_controller/base.rb
+++ b/actionpack/lib/action_controller/base.rb
@@ -43,7 +43,7 @@ module ActionController
#
# def server_ip
# location = request.env["SERVER_ADDR"]
- # render :text => "This server hosted at #{location}"
+ # render text: "This server hosted at #{location}"
# end
#
# == Parameters
@@ -113,9 +113,9 @@ module ActionController
# def search
# @results = Search.find(params[:query])
# case @results.count
- # when 0 then render :action => "no_results"
- # when 1 then render :action => "show"
- # when 2..10 then render :action => "show_many"
+ # when 0 then render action: "no_results"
+ # when 1 then render action: "show"
+ # when 2..10 then render action: "show_many"
# end
# end
#
@@ -131,7 +131,7 @@ module ActionController
# @entry = Entry.new(params[:entry])
# if @entry.save
# # The entry was saved correctly, redirect to show
- # redirect_to :action => 'show', :id => @entry.id
+ # redirect_to action: 'show', id: @entry.id
# else
# # things didn't go so well, do something else
# end
@@ -148,15 +148,15 @@ module ActionController
# An action may contain only a single render or a single redirect. Attempting to try to do either again will result in a DoubleRenderError:
#
# def do_something
- # redirect_to :action => "elsewhere"
- # render :action => "overthere" # raises DoubleRenderError
+ # redirect_to action: "elsewhere"
+ # render action: "overthere" # raises DoubleRenderError
# end
#
# If you need to redirect on the condition of something, then be sure to add "and return" to halt execution.
#
# def do_something
- # redirect_to(:action => "elsewhere") and return if monkeys.nil?
- # render :action => "overthere" # won't be called if monkeys is nil
+ # redirect_to(action: "elsewhere") and return if monkeys.nil?
+ # render action: "overthere" # won't be called if monkeys is nil
# end
#
class Base < Metal