Skip to content
  • speckins's avatar
    841c19cb
    Call block to #redirect_to in controller context (#33735) · 841c19cb
    speckins authored
    * 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 6b3ad0ca), that statement is
    false for procs defined outside of the controller instance.
    
    This commit restores the documented behavior.
    
    Fixes #33731.
    
    * Move test proc into a constant in another class
    
    Per @rafaelfranca's suggestion.
    
    [Steven Peckins + Rafael Mendonça França]
    841c19cb
    Call block to #redirect_to in controller context (#33735)
    speckins authored
    * 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 6b3ad0ca), that statement is
    false for procs defined outside of the controller instance.
    
    This commit restores the documented behavior.
    
    Fixes #33731.
    
    * Move test proc into a constant in another class
    
    Per @rafaelfranca's suggestion.
    
    [Steven Peckins + Rafael Mendonça França]
Loading