Class: Caboose::Vendor

Inherits:
ActiveRecord::Base
  • Object
show all
Defined in:
app/models/caboose/vendor.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.activeObject


26
27
28
# File 'app/models/caboose/vendor.rb', line 26

def self.active
  where(:status => 'Active')
end

Instance Method Details

#clear_filtersObject


34
35
36
# File 'app/models/caboose/vendor.rb', line 34

def clear_filters
  SearchFilter.delete_all
end

#update_productsObject


30
31
32
# File 'app/models/caboose/vendor.rb', line 30

def update_products
  self.products.each { |product| product.update_attribute(:vendor_status, self.status) }
end