Method: Og::HasMany#resolve_polymorphic
- Defined in:
- lib/og/relation/has_many.rb
#resolve_polymorphic ⇒ Object
23 24 25 26 27 28 29 |
# File 'lib/og/relation/has_many.rb', line 23 def resolve_polymorphic unless target_class.relations.empty? unless target_class.relations.find { |r| r.is_a?(BelongsTo) and r.target_class == owner_class } target_class.belongs_to(owner_class) end end end |