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.

https://github.com/ryanb/cancan/#readme
Header: Aliasing Actions

or custom actions:
https://github.com/ryanb/cancan/wiki/custom-actions
https://github.com/ryanb/cancan/wiki/Authorizing-Controller-Actions

or non-restfull controllers:
https://github.com/ryanb/cancan/wiki/Non-RESTful-Controllers

Best,
Marcin