before_filter question

Hi-

So I am using before_filter to manage authentication on my site. I see that you can add before_filter to a controller to restrict access to all methods in that controller.

Is it possible to limit access to a specified set of actions, instead of the whole controller?

Thanks!

pete wrote:

Hi-

So I am using before_filter to manage authentication on my site. I see that you can add before_filter to a controller to restrict access to all methods in that controller.

Is it possible to limit access to a specified set of actions, instead of the whole controller?

Thanks!

You mean like?

class UsersController < ApplicationController   before_filter :login_required, :except => [:index, :show]   before_filter :check_administrator_role, :only => [:new, :edit, :create, :update]

Exactly, thank you!