Sha256: 8c2359ec215c85a13a2daee709f9399a93fc61a1745c61ae0019d61e83ae19c2
Contents?: true
Size: 609 Bytes
Versions: 10
Compression:
Stored size: 609 Bytes
Contents
module SimpleForm module Inputs # Uses MapType to handle basic input types. class MappingInput < Base extend MapType map_type :boolean, :to => :check_box map_type :password, :to => :password_field map_type :text, :to => :text_area map_type :file, :to => :file_field def input @builder.send(input_method, attribute_name, input_html_options) end def input_method method = self.class.mappings[input_type] raise "Could not find method for #{input_type.inspect}" unless method method end end end end
Version data entries
10 entries across 10 versions & 1 rubygems