Module: Recommender::Recommendation::ClassMethods
- Defined in:
- lib/recommender/recommendation.rb
Instance Attribute Summary collapse
-
#association_metadata ⇒ Object
Returns the value of attribute association_metadata.
Instance Method Summary collapse
Instance Attribute Details
#association_metadata ⇒ Object
Returns the value of attribute association_metadata.
16 17 18 |
# File 'lib/recommender/recommendation.rb', line 16 def end |
Instance Method Details
#set_association(association_name) ⇒ Object
18 19 20 21 22 23 |
# File 'lib/recommender/recommendation.rb', line 18 def set_association(association_name) reflection = reflect_on_association(association_name.to_sym) raise ArgumentError, "Association '#{association_name}' not found" unless reflection ||= (reflection) end |