Class: Spree::Property
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- Spree::Property
- Defined in:
- app/models/spree/property.rb
Class Method Summary collapse
Class Method Details
.find_all_by_prototype(prototype) ⇒ Object
14 15 16 17 18 19 20 |
# File 'app/models/spree/property.rb', line 14 def self.find_all_by_prototype(prototype) id = prototype if prototype.class == Prototype id = prototype.id end joins("LEFT JOIN properties_prototypes ON property_id = #{self.table_name}.id").where(:prototype_id => id) end |