Rails 3 way of doing skip_before_filter, :only

Viewed 18591

In rails 2.8 we can write skip_before_filter like this

skip_before_filter :require_login, :only => [:create,:new,:accept]

which means, i wanted to apply the filter require_login only to these actions [:create,:new,:accept], and skip the filter for others.

But it seems, this way is deprecated in rails 3. And new skip_filter is added. i have tried this

 skip_filter :require_login, :only => [:create,:new,:accept]

but its not working, so how can i do this in rails 3.

2 Answers
Related