Module: EagerLoadablePolymorphicAssociation
- Defined in:
- lib/eager_loadable_polymorphic_association.rb,
lib/eager_loadable_polymorphic_association/version.rb
Defined Under Namespace
Classes: AssociationWriter
Constant Summary collapse
- VERSION =
"0.0.1"
Instance Method Summary collapse
Instance Method Details
#eager_loadable_polymorphic_association(association_name, types) ⇒ Object
55 56 57 58 59 60 61 |
# File 'lib/eager_loadable_polymorphic_association.rb', line 55 def eager_loadable_polymorphic_association(association_name, types) assoc = AssociationWriter.new(reflections[association_name.to_sym], types) assoc.belong_to_them(self) assoc.define_scope(self) assoc.override_accessor(self) end |