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
Kent Sibilev
2006-Feb-20 14:16 UTC
[Rails] Using :except or :only on a before_filter block
before_filter(:only => [:anaction]) { |c| c.role_required ''admin'' } before_filter(:except => [:anaction]) { |c| c.role_required ''admin'' } -- Kent --- http://www.datanoise.com On 2/20/06, Tom Taylor <tom@tomtaylor.co.uk> wrote:> 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 > > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails >