Sha256: ff0bee6e937a0c1a95c66293750d093c83a1a13a145fcc534fe882b0428dced7

Contents?: true

Size: 400 Bytes

Versions: 15

Compression:

Stored size: 400 Bytes

Contents

module UiBibzInputs
  class BaseInput < SimpleForm::Inputs::Base

    def input(wrapper_options)
      super
    end

    def options
      super.merge({ value: @builder.object.send(attribute_name)}).merge(@builder.options[:input_html] || {})
    end

    private

    def input_attribute_name
      "#{ @builder.object.class.name.gsub('::', "").underscore }[#{ attribute_name }]"
    end

  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
ui_bibz-2.1.5 lib/ui_bibz/inputs/ui_bibz_inputs/base_input.rb
ui_bibz-2.1.4 lib/ui_bibz/inputs/ui_bibz_inputs/base_input.rb
ui_bibz-2.1.3 lib/ui_bibz/inputs/ui_bibz_inputs/base_input.rb
ui_bibz-2.1.2 lib/ui_bibz/inputs/ui_bibz_inputs/base_input.rb
ui_bibz-2.1.1 lib/ui_bibz/inputs/ui_bibz_inputs/base_input.rb
ui_bibz-2.0.10 lib/ui_bibz/inputs/ui_bibz_inputs/base_input.rb
ui_bibz-2.0.9 lib/ui_bibz/inputs/ui_bibz_inputs/base_input.rb
ui_bibz-2.1.0 lib/ui_bibz/inputs/ui_bibz_inputs/base_input.rb
ui_bibz-2.0.8 lib/ui_bibz/inputs/ui_bibz_inputs/base_input.rb
ui_bibz-2.0.7 lib/ui_bibz/inputs/ui_bibz_inputs/base_input.rb
ui_bibz-2.0.5 lib/ui_bibz/inputs/ui_bibz_inputs/base_input.rb
ui_bibz-2.0.4 lib/ui_bibz/inputs/ui_bibz_inputs/base_input.rb
ui_bibz-2.0.3 lib/ui_bibz/inputs/ui_bibz_inputs/base_input.rb
ui_bibz-2.0.2 lib/ui_bibz/inputs/ui_bibz_inputs/base_input.rb
ui_bibz-2.0.1 lib/ui_bibz/inputs/ui_bibz_inputs/base_input.rb