ruby on rails - Application Controller with before_filters that execute first and last -


I before_filter to all before all before_filters, and before all other before_filters one before_filter to your application controller Want to install how can I do this?

Application controller in Rail is executed first, then another controller is executed. So I can either be first, or last authorize more_info, but not both .... I have tried various prepend_before_filters, with no luck append_before_filters (the main issue, to be that append_before_filter before_filter If it seems to be a nickname then it does not actually enclose more enimo)

Example given below:

  class ApplicationController & lt; ActionController :: Base before_filter: Authorized # should be preceded by: some_ index_filter_filter: another_action append_before_filter: more_info # end should end other administrators & lt; ApplicationController #Approximately 30 other controllers before_filter: various_action before_filter: different_action before_filter: mas_acciones before_filter: must be between get_other #all actions authorized and more_info before_filter all controllers mais_acoes end   

Required:
1. Authorize 2. 2. get_other
3. more_info

Actual:
1. Authorize 2. More_info 3. Get_other

Using Rail 4.0.0

Please try this way: < / P>

  class ApplicationController & lt; ActionController :: Base before_filter: Authorized # should be preceded by: More_Infost # Last Last Class Should Other Controller & lt; ApplicationController append_before_filter: authorizes: get_other,:. More_info authorized between end #should be more_info   

get_other will be among the authorized and more_info

Comments

Popular posts from this blog

c - Mpirun hangs when mpi send and recieve is put in a loop -

python - Apply coupon to a customer's subscription based on non-stripe related actions on the site -

java - Unable to get JDBC connection in Spring application to MySQL -