Closed elsom25 closed 10 years ago
I'd certainly entertain a pull request to make them protected. :)
Thanks for the pull request. That's merged. I'll do a new release shortly. In the mean time;
gem 'canard', git: 'https://github.com/james2m/canard.git'
thanks kindly... If I find a nicer way to handle multiple Abilities, I'll make a PR to reopen discussion
A subclass seems a pretty clean solution.
James McCarthy This is Hatch Ltd http://thisishatch.co.uk james@thisishatch.co.uk US: +1-212-203-7104 UK: +44-7946-463686
On 16 Jul 2014, at 11:20, Jesse McGinnis notifications@github.com wrote:
thanks kindly... If I find a nicer way to handle multiple Abilities, I'll make a PR to reopen discussion
— Reply to this email directly or view it on GitHub.
It would be awesome to have multiple ability definitions for applications that have multiple "apps" with different permissions (primary example being an admin app vs the standard app).
I know this is a relatively common use-case in plain old CanCan(Can), but was wondering how you'd suggest doing so with Canard?
I have a rudimentary solution working, but it requires me to create a custom
Ability
class from yours (partly due to the methods beingprivate
overprotected
, partly to provide a hook)and then for my "custom" ablities, inheriting from the new class, and adjusting as necessary (currently by just simply appending
admin_
to the front, just to see if it'd work)