module FormObj::ModelMapper::ClassMethods

Public Instance Methods

array_class() click to toggle source
# File lib/form_obj/model_mapper.rb, line 19
def array_class
  ModelMapper::Array
end
attribute_class() click to toggle source
# File lib/form_obj/model_mapper.rb, line 15
def attribute_class
  ModelMapper::Attribute
end
load_from_model(*args) click to toggle source
# File lib/form_obj/model_mapper.rb, line 31
def load_from_model(*args)
  new.load_from_model(*args)
end
load_from_models(*args) click to toggle source
# File lib/form_obj/model_mapper.rb, line 35
def load_from_models(*args)
  new.load_from_models(*args)
end
model_hash=(value) click to toggle source
# File lib/form_obj/model_mapper.rb, line 23
def model_hash=(value)
  _attributes.each { |attribute| attribute.model_attribute.hash_item = value }
end
model_primary_key() click to toggle source
# File lib/form_obj/model_mapper.rb, line 27
def model_primary_key
  ModelMapper::ModelPrimaryKey.new(_attributes.find(primary_key).model_attribute)
end