Class: Spree::Property
- Defined in:
- app/models/spree/property.rb
Class Method Summary collapse
Methods inherited from Base
Methods included from Spree::Preferences::Preferable
#clear_preferences, #default_preferences, #defined_preferences, #get_preference, #has_preference!, #has_preference?, #preference_default, #preference_type, #set_preference
Class Method Details
.find_all_by_prototype(prototype) ⇒ Object
14 15 16 17 18 19 |
# File 'app/models/spree/property.rb', line 14 def self.find_all_by_prototype(prototype) id = prototype id = prototype.id if prototype.class == Prototype joins("LEFT JOIN properties_prototypes ON property_id = #{self.table_name}.id"). where(prototype_id: id) end |