Module: NoBrainer::Document::Association::ClassMethods
- Defined in:
- lib/no_brainer/document/association.rb
Instance Method Summary collapse
- #association_user_to_model_cast(key, value, target_class = nil) ⇒ Object
- #inherited(subclass) ⇒ Object
Instance Method Details
#association_user_to_model_cast(key, value, target_class = nil) ⇒ Object
24 25 26 27 28 29 30 31 |
# File 'lib/no_brainer/document/association.rb', line 24 def association_user_to_model_cast(key, value, target_class = nil) association = [key] case association when NoBrainer::Document::Association::BelongsTo::Metadata association.cast_attr(key, value, target_class) else [key, value] end end |
#inherited(subclass) ⇒ Object
19 20 21 22 |
# File 'lib/no_brainer/document/association.rb', line 19 def inherited(subclass) subclass. = self..dup super end |