Does rails guarantee that the order of execution of multiple 
append_action_filters is same as the order in which these filters appear in 
the source file? For example,
I have a rails controller problems_controller.rb, a snippet from which is 
copied below.

append_before_action *:force_sign_out_if_token_about_to_expire*,  
only: [:get_create_problem_page, 
       :get_create_problem_page_v2,
       :get_solve_problem_page]

append_before_action *:require_signed_in_user*,  
only [:get_create_problem_page,  
      :get_create_problem_page_v2,  
      :get_solve_problem_page]  

By using print statements, I can see that *for all three actions listed 
above, force_sign_out_if_token_about_to_expire is executed before 
require_signed_in_user*. But I *couldn't find rails documentation which 
supports this observation*. Though I could find documentation for filter 
chain ordering here 
<http://api.rubyonrails.org/v2.3/classes/ActionController/Filters/ClassMethods.html>
 
, for my application I would prefer to use the filters in the style listed 
above. Also, there is a problem I am facing if I try using the filters as 
stated in documentation. I can elaborate on that if required.

Thank you in advance,
Nilesh

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Core" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to rubyonrails-core+unsubscr...@googlegroups.com.
To post to this group, send email to rubyonrails-core@googlegroups.com.
Visit this group at https://groups.google.com/group/rubyonrails-core.
For more options, visit https://groups.google.com/d/optout.

Reply via email to