|
|
@@ -2,6 +2,7 @@
|
|
|
class Product < ActiveRecord::Base
|
|
|
has_paper_trail
|
|
|
self.table_name = 'products'
|
|
|
+ authorize! :index, @user, :message=> 'Not authorized as an administrator.'
|
|
|
|
|
|
scope :active, -> { where(ptype: "cent_sale") }
|
|
|
scope :inactive, -> { where(ptype: "direct_sale") }
|