Sha256: 779e8fc18e21e74a331831e682f96400517239d7fcc7ce805836542730674bfc
Contents?: true
Size: 522 Bytes
Versions: 9
Compression:
Stored size: 522 Bytes
Contents
class DatePickerInput < SimpleForm::Inputs::Base def input(wrapper_options) if input_type == :date || input_type == :datetime || input_type == :time type = input_type else column = @builder.object.class.columns.select{ |c| c.name == attribute_name.to_s }.first type = column.present? ? column.type : nil end type||= :date opts = wrapper_options.merge(input_options.deep_dup) opts[:type] = type @builder.date_picker(attribute_name, opts) end end
Version data entries
9 entries across 9 versions & 1 rubygems