Module: NumberedRelationships::ConstructorFinder
- Defined in:
- lib/numbered_relationships/constructor_finder.rb
Class Method Summary collapse
Class Method Details
.find(options = {}) ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/numbered_relationships/constructor_finder.rb', line 7 def self.find(={}) reflection = [:reflection] case reflection.macro when :has_and_belongs_to_many HasAndBelongsToManyConstructor.new() when :has_many thru = reflection.[:through] if reflection return HasManyConstructor.new() unless thru HasManyThroughConstructor.new() end end |