ryanb / cancan

Authorization Gem for Ruby on Rails.
MIT License
6.26k stars 782 forks source link

Split up my CanCan Ability #766

Open vixlima opened 12 years ago

vixlima commented 12 years ago

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

nishanthan144 commented 12 years ago

Yes it is possible to split your Ability

Recently I met the same

Check this may be it helps you

markijbema commented 11 years ago

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

xhoy commented 10 years ago

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!