Class: Caboose::Vendor
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- Caboose::Vendor
- Defined in:
- app/models/caboose/vendor.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.active ⇒ Object
25 26 27 |
# File 'app/models/caboose/vendor.rb', line 25 def self.active where(:status => 'Active') end |
Instance Method Details
#clear_filters ⇒ Object
33 34 35 |
# File 'app/models/caboose/vendor.rb', line 33 def clear_filters SearchFilter.delete_all end |
#update_products ⇒ Object
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 |