Skip to content

Commit

Permalink
Merge pull request #2551 from esparta/using_polimorfic_for_not_signed…
Browse files Browse the repository at this point in the history
…_abilities

Improve overall performance on not_signed abilities
  • Loading branch information
hennevogel authored Jul 17, 2019
2 parents 920a5e8 + 6421916 commit c5ad952
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/models/ability.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def not_signed_in
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'
Expand Down

0 comments on commit c5ad952

Please sign in to comment.