cancan icon indicating copy to clipboard operation
cancan copied to clipboard

Split up my CanCan Ability

Open vixlima opened this issue 13 years ago • 3 comments

hello,

Is possible split my CanCan 2.0 Ability similar RailsCast episode 386?

   if user.nil?
      GuestPermission.new
    elsif user.admin?
      AdminPermission.new(user)
    else
      MemberPermission.new(user)
    end

Thanks

Andre Lima

vixlima avatar Oct 24 '12 17:10 vixlima

Yes it is possible to split your Ability

Recently I met the same

Check this may be it helps you

nishanthan144 avatar Oct 26 '12 11:10 nishanthan144

It seems to me the question is answered by @nishanthan144, so the issue can be closed.

markijbema avatar Sep 04 '13 04:09 markijbema

Thanks for your submission! The ryanb/cancan repository has been inactive since Sep 06, 2013. Since only Ryan himself has commit permissions, the CanCan project is on a standstill.

CanCan has many open issues, including missing support for Rails 4. To keep CanCan alive, an active fork exists at cancancommunity/cancancan. The new gem is cancancan. More info is available at #994.

If your pull request or issue is still applicable, it would be really appreciated if you resubmit it to CanCanCan.

We hope to see you on the other side!

xhoy avatar Jul 01 '14 07:07 xhoy