Using :except or :only on a before_filter block


#1

Hi all,

How do you use :except or :only conditions on a filter block? I can’t
seem to work out the syntax!

I’m currently doing:

before_filter { |c| c.role_required ‘admin’ }

Thanks a lot!

Tom


#2

before_filter(:only => [:anaction]) { |c| c.role_required ‘admin’ }
before_filter(:except => [:anaction]) { |c| c.role_required ‘admin’ }


Kent

http://www.datanoise.com