Hello,
How can i apply a before_filter on all controllers in application.rb
without some specific controllers. Is there something like :only and
:except for controllers like there is for methods?
Hello,
How can i apply a before_filter on all controllers in application.rb
without some specific controllers. Is there something like :only and
:except for controllers like there is for methods?
Hi,
Pawel Jur wrote:
How can i apply a before_filter on all controllers in application.rb
without some specific controllers. Is there something like :only and
:except for controllers like there is for methods?
You can use skip_after_filter, skip_before_filter, or skip_filter to
skip filters in a controller.
http://api.rubyonrails.com/classes/ActionController/Filters/ClassMethods.html
Lutz
Lutz H. wrote:
Hi,
Pawel Jur wrote:
How can i apply a before_filter on all controllers in application.rb
without some specific controllers. Is there something like :only and
:except for controllers like there is for methods?You can use skip_after_filter, skip_before_filter, or skip_filter to
skip filters in a controller.Lutz
Wow, skip_filter … nice!
thanks. just what i was looking for.
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.
Sponsor our Newsletter | Privacy Policy | Terms of Service | Remote Ruby Jobs