permissify 0.0.5 → 0.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,30 @@
1
+ class Product < ActiveRecord::Base
2
+ validates_presence_of :name
3
+ validates_uniqueness_of :name
4
+ before_create :initialize_permissions
5
+ serialize :permissions
6
+ include Permissify::Model
7
+ # is_paranoid
8
+ default_scope :conditions => {:deleted_at => nil}, :order => "products.name"
9
+
10
+ class << self
11
+ include Permissify::ModelClass
12
+ include SystemFixtures::Products
13
+
14
+ # TODO : this stuff should be plugged in by app
15
+ def revenuepwr; locate(1, 'revenuePWR'); end
16
+ def integrated_reservations; locate(3, 'Integrated Reservations'); end
17
+ def pos_integration; locate(3, 'POS Integration'); end
18
+ def standalone_reservations; locate(4, 'Standalone Reservations'); end
19
+ def online_ordering; locate(5, 'Online Ordering'); end
20
+ def loyalty; locate(6, 'Loyalty'); end
21
+ def webpage_builder; locate(7, 'Webpage Builder'); end
22
+ def egift; locate(8, 'eGift'); end
23
+ def guest_management; locate(12, 'Guest Management'); end
24
+ def mobile_marketing; locate(13, 'Mobile Marketing'); end
25
+ def offers_and_incentives; locate(14, 'Offers & Incentives'); end
26
+ def revenuepwr_lite; locate(15, 'revenuePWR Lite'); end
27
+ def waitlist; locate(16, 'Waitlist'); end
28
+ def consumer_driven_deals; locate(17, 'Consumer-Driven Deals'); end
29
+ end
30
+ end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: permissify
3
3
  version: !ruby/object:Gem::Version
4
- hash: 21
4
+ hash: 19
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 5
10
- version: 0.0.5
9
+ - 6
10
+ version: 0.0.6
11
11
  platform: ruby
12
12
  authors:
13
13
  - Frederick Fix
@@ -68,6 +68,7 @@ files:
68
68
  - lib/generators/permissify/product/product_generator.rb
69
69
  - lib/generators/permissify/product/template/interface/permissified_brand.rb
70
70
  - lib/generators/permissify/product/template/interface/permissified_merchant.rb
71
+ - lib/generators/permissify/product/template/product.rb
71
72
  - lib/generators/permissify/product/USAGE
72
73
  - lib/generators/permissify/role/role_generator.rb
73
74
  - lib/generators/permissify/role/template/role.rb