Skip to content

Instantly share code, notes, and snippets.

@fnando
Created September 18, 2010 23:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fnando/586188 to your computer and use it in GitHub Desktop.
Save fnando/586188 to your computer and use it in GitHub Desktop.
raise "Check #{__FILE__} and http://bit.ly/9IK52W to see if this hack is still needed." if Rails.version > "3.0.0"
class ActionController::Base
private
alias :_compute_redirect_to_location_original :_compute_redirect_to_location
def _compute_redirect_to_location(options)
case options
when Proc
_compute_redirect_to_location instance_eval(&options)
else
_compute_redirect_to_location_original options
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment