File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed
actionpack/lib/action_controller Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -185,19 +185,22 @@ module ActionController
185
185
#
186
186
# ## Calling multiple redirects or renders
187
187
#
188
- # An action may contain only a single render or a single redirect. Attempting to
189
- # try to do either again will result in a DoubleRenderError:
188
+ # An action may perform only a single render or a single redirect. Attempting to
189
+ # do either again will result in a DoubleRenderError:
190
190
#
191
191
# def do_something
192
192
# redirect_to action: "elsewhere"
193
193
# render action: "overthere" # raises DoubleRenderError
194
194
# end
195
195
#
196
196
# If you need to redirect on the condition of something, then be sure to add
197
- # "and return" to halt execution.
197
+ # "return" to halt execution.
198
198
#
199
199
# def do_something
200
- # redirect_to(action: "elsewhere") and return if monkeys.nil?
200
+ # if monkeys.nil?
201
+ # redirect_to(action: "elsewhere")
202
+ # return
203
+ # end
201
204
# render action: "overthere" # won't be called if monkeys is nil
202
205
# end
203
206
#
You can’t perform that action at this time.
0 commit comments