Forum: Ruby on Rails How can I use before_filter?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Zhao Y. (Guest)
on 2008-12-01 02:48
This is my code:

before_filter :authorize, :except=>:login

This is one exception, "login" but I want to add more exceptions. How
can I do this?
Steve R. (Guest)
on 2008-12-01 02:55
(Received via mailing list)
On Nov 30, 2008, at 4:48 PM, Zhao Yi wrote:

>
> This is my code:
>
> before_filter :authorize, :except=>:login
>
> This is one exception, "login" but I want to add more exceptions. How
> can I do this?
> --

before_filter :authorize, :except=>[:login, :reset_password]
Zhao Y. (Guest)
on 2008-12-01 03:00
Steve R. wrote:
> On Nov 30, 2008, at 4:48 PM, Zhao Yi wrote:
>
>>
>> This is my code:
>>
>> before_filter :authorize, :except=>:login
>>
>> This is one exception, "login" but I want to add more exceptions. How
>> can I do this?
>> --
>
> before_filter :authorize, :except=>[:login, :reset_password]

it works, thanks very much.
This topic is locked and can not be replied to.