Class: OneStoreAssociation
- Inherits:
-
Association
- Object
- Field
- Association
- OneStoreAssociation
- Includes:
- OneAssociation, StoreAssociation
- Defined in:
- lib/yodel/models/core/associations/store/one_store_association.rb
Constant Summary
Constants inherited from Field
Instance Attribute Summary
Attributes inherited from Field
Instance Method Summary collapse
Methods included from OneAssociation
#before_destroy, #search_terms_set, #typecast
Methods included from StoreAssociation
#associate, #record_options, #unassociate, #validate
Methods inherited from Association
Methods inherited from Field
#display?, field_from_type, #from_json, from_options, #include_in_search_keywords?, #index?, #inherited?, #initialize, #method_missing, #numeric?, #required?, #searchable?, #strip_nil?, #to_json, #to_str, #typecast, #unique?, #validate
Constructor Details
This class inherits a constructor from Field
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Field
Instance Method Details
#default_input_type ⇒ Object
5 6 7 |
# File 'lib/yodel/models/core/associations/store/one_store_association.rb', line 5 def default_input_type :store_one end |
#untypecast(value, record) ⇒ Object
9 10 11 |
# File 'lib/yodel/models/core/associations/store/one_store_association.rb', line 9 def untypecast(value, record) value.respond_to?(:id) ? value.id : nil end |