Use the “return” statement to fix this issue.
(E.g)
def do_something
redirect_to(:action => “elsewhere”) and return if monkeys.nil?
render :action => “overthere” # won’t be called if monkeys is nil
end
(copied from http://api.rubyonrails.org/classes/ActionController/Base.html)
