Files

SimpleForm::MapType

Public Instance Methods

map_type(*types) click to toggle source
# File lib/simple_form/map_type.rb, line 7
def map_type(*types)
  options = types.extract_options!
  raise ArgumentError, "You need to give :to as option to map_type" unless options[:to]
  types.each { |t| mappings[t] = options[:to] }
end
mappings() click to toggle source
# File lib/simple_form/map_type.rb, line 3
def mappings
  @mappings ||= {}
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.