Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Call block to #redirect_to in controller context #33735

Merged
merged 2 commits into from
Aug 28, 2018

Commits on Aug 28, 2018

  1. Call block to #redirect_to in controller context

    The documentation for ActionController::Redirecting states that a Proc
    argument "will be executed in the controller's context."  However,
    unless #instance_eval is used (removed in 6b3ad0c), that statement is
    false for procs defined outside of the controller instance.
    
    This commit restores the documented behavior.
    
    Fixes rails#33731.
    speckins committed Aug 28, 2018
    Configuration menu
    Copy the full SHA
    071d926 View commit details
    Browse the repository at this point in the history
  2. Move test proc into a constant in another class

    Per @rafaelfranca's suggestion.
    speckins committed Aug 28, 2018
    Configuration menu
    Copy the full SHA
    75c3308 View commit details
    Browse the repository at this point in the history