Explorar el Código

model add scope

abiao hace 4 años
padre
commit
7a5aa72050
Se han modificado 1 ficheros con 2 adiciones y 0 borrados
  1. 2 0
      app/models/product.rb

+ 2 - 0
app/models/product.rb

@@ -2,6 +2,8 @@
 class Product < ActiveRecord::Base
     has_paper_trail
     self.table_name = 'products'
+    devise_for :admins
+
     #Thread.current[:current_user] = @current_user
     scope :active, -> { where(ptype: "cent_sale") }
     scope :inactive, -> { where(ptype: "direct_sale") }