CanCan gem help required

Hi to all.

How can we specify access to the some specific method of a controller.

like we can specify things like:

can :manage, User

if user have two custom methods like , method1 and method2
and i want to give access to method1 but not to method2

How can i do so?

Waiting for someones response.

Hi Nazar,

You just gotta alias those methods in ability.rb or call the
authorize! method in Your custom action.

Header: Aliasing Actions

or custom actions:

or non-restfull controllers:

Best,
Marcin