Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def add_app(app_id, actor_user = nil)
- app = App.find_by_id(app_id)
- return unless app &&
- (app.account_id == role.account_id)
- old_app_ids = role.grants.map(&:app_id)
- update_apps(old_app_ids + [app_id], actor_user)
- end
Add Comment
Please, Sign In to add comment