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



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

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

Instance Method Details

#clear_filtersObject



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

def clear_filters
  SearchFilter.delete_all
end

#update_productsObject



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

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