Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- module Abilities
- class MyModel < Base
- def initialize(user)
- super(user)
- return unless user.present?
- can :manage, ::MyModel, my_other_model: { user_id: user.id }
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement