diff --git a/app/models/ability.rb b/app/models/ability.rb index a4731816..caf8f2a4 100644 --- a/app/models/ability.rb +++ b/app/models/ability.rb @@ -36,7 +36,7 @@ class Ability end # can view Commercials of confirmed Events - can :show, Commercial, commercialable_type: 'Event', commercialable_id: Event.where(state: 'confirmed').pluck(:id) + can :show, Commercial, commercialable: Event.where(state: 'confirmed') can [:show, :create], User can [:index, :show], Survey, surveyable_type: 'Conference'