module Form::ActiveModel::ModelReflections::ClassMethods
Public Instance Methods
reflect_on_association(*args)
click to toggle source
Delegate reflect_on_association
to the model class to support simple_form's association input.
# File lib/reform/form/active_model/model_reflections.rb, line 16 def reflect_on_association(*args) model_name.to_s.constantize.reflect_on_association(*args) end
validators_on(*args)
click to toggle source
this is needed in simpleform to infer required fields.
# File lib/reform/form/active_model/model_reflections.rb, line 21 def validators_on(*args) validation_groups.collect { |k, group| group.instance_variable_get(:@validations).validators_on(*args) }.flatten end