summaryrefslogtreecommitdiff
path: root/lib/solidus_subscriptions/engine.rb
diff options
context:
space:
mode:
authorAlex Blackie <alex@alexblackie.com>2016-09-23 11:30:36 -0700
committerAlex Blackie <alex@alexblackie.com>2016-09-23 11:50:53 -0700
commite2d602ebd0b0789399a71ec03e94b05bc9e7d9eb (patch)
tree3f6a873b23dc8d8db5f3e02917c5a690672d0324 /lib/solidus_subscriptions/engine.rb
parent5415f1e0381ed3be99acadb79fcead5be38d175d (diff)
Add CanCan abilities class
This adds a CanCan class for modelling our permissions. This then modifies the LineItemsController to use the new CanCan abilities instead of manually checking.
Diffstat (limited to 'lib/solidus_subscriptions/engine.rb')
-rw-r--r--lib/solidus_subscriptions/engine.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/solidus_subscriptions/engine.rb b/lib/solidus_subscriptions/engine.rb
index 5dea444..6b42716 100644
--- a/lib/solidus_subscriptions/engine.rb
+++ b/lib/solidus_subscriptions/engine.rb
@@ -18,6 +18,8 @@ module SolidusSubscriptions
Dir.glob(File.join(File.dirname(__FILE__), '../../app/overrides/**/*.rb')) do |c|
Rails.configuration.cache_classes ? require(c) : load(c)
end
+
+ Spree::Ability.register_ability(SolidusSubscriptions::Ability)
end
config.to_prepare(&method(:activate).to_proc)