Sha256: 8d1ffeccb8bb4bf6ff6e166d12e2da0f371b34650e1b3e85ffa52bdd0c4d865b
Contents?: true
Size: 548 Bytes
Versions: 2
Compression:
Stored size: 548 Bytes
Contents
require 'og/relation/joins_many' module Og # A 'many_to_many' relation. # This objects is associated with an other using an intermediate # join table. Just an alias for 'joins_many'. # # === Examples # # many_to_many Category # many_to_many :categories, Category class ManyToMany < JoinsMany #-- # FIXME: better enchant polymorphic parents and then add # an alias to :objects. #++ def resolve_polymorphic target_class.module_eval %{ many_to_many :#{owner_class.to_s.demodulize.underscore.pluralize} } end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
og-0.41.0 | lib/og/relation/many_to_many.rb |
og-0.40.0 | lib/og/relation/many_to_many.rb |