I have a before_filter: method in my application_controller and I want this method to run after the before_filter methods in the inherit class.
How can i do this?
Example
class ApplicationController < ActionController::Base protect_from_forgery before_filter :run_second end class SessionsController < ApplicationController before_filter :run_first end
I think the most convenient way for Rails would be to use prepend_before_filter in your SessionController:
prepend_before_filter
class SessionsController < ApplicationController prepend_before_filter :run_first end
Source: https://habr.com/ru/post/890832/More articles:how to get sweave to centers without centering code - rAVAudioPlayer will not play repeatedly - iosHow to close and apply jQuery Mobile modal Dialog? - jqueryStructural Marshal in C # - arraysfile_put_contents question - phpFloating-Point Competition from IBM to IEEE - javaHow do you add a filter to the very end of the superclass filter chain? - filterGet attributes and values ββusing SimpleXML - phpConvert from IBM floating point to IEEE floating point standard and Vice Versa- In C #? - cDynamic Ignore Xml Serialization - c #All Articles