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 On 24 Lis, 00:36, NazarHussain <[email protected]> wrote: > 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. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

