diff options
author | Brendan Deere <brendangdeere@gmail.com> | 2016-10-05 14:45:29 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-10-05 14:45:29 -0700 |
commit | 5c971a4463dfc71d04f0c92696f04d330b5259e4 (patch) | |
tree | a11a024f6e5a28718a063312f2e4102d3cb6d71c /lib/solidus_subscriptions | |
parent | f127832e52bd15f7020120915f279ee27a84d101 (diff) | |
parent | 31c14bcc227a802e5cf13660a410dc24c7fd615a (diff) |
Merge pull request #84 from brendandeere/preferred_abilities
Prefer hash conditions over blocks
Diffstat (limited to 'lib/solidus_subscriptions')
-rw-r--r-- | lib/solidus_subscriptions/ability.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/solidus_subscriptions/ability.rb b/lib/solidus_subscriptions/ability.rb index 5a16f9e..e906b08 100644 --- a/lib/solidus_subscriptions/ability.rb +++ b/lib/solidus_subscriptions/ability.rb @@ -7,7 +7,7 @@ module SolidusSubscriptions li.order.user == user || li.order == order end - can(:manage, Subscription) { |s| s.user == user } + can(:manage, Subscription, user_id: user.id) end end end |