before_filter(*filters, &block) public
Register or log in to add new notes.
July 31, 2008
7 thanks

Multiple filter methods with :only, :except

Notice that this methods accepts *filters param, so you can pass array of methods with :only or :except too

Example

before_filter [:authorize, :set_locale], :except => :login

July 23, 2008 - (v1.2.0 - v2.1.0)
6 thanks

:only, :except and passing in multiple parameters

To specify that the filter should be applied to or excluded from given controller actions, use the :only and :except parameters. To pass in multiple controller actions use an array:

   before_filter :authorize, :except => [:index, :show]
   before_filter :authorize, :only => :delete