Merge pull request #2551 from esparta/using_polimorfic_for_not_signed_abilities
Improve overall performance on not_signed abilities
This commit is contained in:
commit
c5ad9525ed
1 changed files with 1 additions and 1 deletions
|
|
@ -36,7 +36,7 @@ class Ability
|
||||||
end
|
end
|
||||||
|
|
||||||
# can view Commercials of confirmed Events
|
# 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 [:show, :create], User
|
||||||
|
|
||||||
can [:index, :show], Survey, surveyable_type: 'Conference'
|
can [:index, :show], Survey, surveyable_type: 'Conference'
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue