module Form::ORM

Public Instance Methods

model_for_property(name) click to toggle source
# File lib/reform/form/orm.rb, line 2
def model_for_property(name)
  return model unless is_a?(Reform::Form::Composition) # i am too lazy for proper inheritance. there should be a ActiveRecord::Composition that handles this.

  model_name = options_for(name)[:on]
  model[model_name]
end