Sha256: d0138d63783b03165932bc6502b97daa989edb560ffc8416be180ee0c0245f61

Contents?: true

Size: 1.2 KB

Versions: 11

Compression:

Stored size: 1.2 KB

Contents

class StringInput < SimpleForm::Inputs::StringInput
  def input(wrapper_options = nil)
    "<section>#{super}</section>".html_safe
  end
end

class NumericInput < SimpleForm::Inputs::NumericInput
  def input(wrapper_options = nil)
    "<section>#{super}</section>".html_safe
  end
end

class CustomizedInput < SimpleForm::Inputs::StringInput
  def input(wrapper_options = nil)
    "<section>#{super}</section>".html_safe
  end

  def input_method
    :text_field
  end
end

class DeprecatedInput < SimpleForm::Inputs::StringInput
  def input
    "<section>#{super}</section>".html_safe
  end

  def input_method
    :text_field
  end
end

class CollectionSelectInput < SimpleForm::Inputs::CollectionSelectInput
  def input_html_classes
    super.push('chosen')
  end
end

module CustomInputs
  class CustomizedInput < SimpleForm::Inputs::StringInput
    def input_html_classes
      super.push('customized-namespace-custom-input')
    end
  end

  class PasswordInput < SimpleForm::Inputs::PasswordInput
    def input_html_classes
      super.push('password-custom-input')
    end
  end

  class NumericInput < SimpleForm::Inputs::PasswordInput
    def input_html_classes
      super.push('numeric-custom-input')
    end
  end
end

Version data entries

11 entries across 11 versions & 3 rubygems

Version Path
simple_form-3.5.0 test/support/discovery_inputs.rb
enju_leaf-1.2.1 vendor/bundle/ruby/2.3/gems/simple_form-3.4.0/test/support/discovery_inputs.rb
simple_form-3.4.0 test/support/discovery_inputs.rb
simple_form-3.3.1 test/support/discovery_inputs.rb
simple_form-3.3.0 test/support/discovery_inputs.rb
simple_form-3.2.1 test/support/discovery_inputs.rb
sc_core-0.0.7 test/dummy/vendor/bundle/ruby/2.2.0/gems/simple_form-3.2.0/test/support/discovery_inputs.rb
simple_form-3.2.0 test/support/discovery_inputs.rb
simple_form-3.1.1 test/support/discovery_inputs.rb
simple_form-3.1.0 test/support/discovery_inputs.rb
simple_form-3.1.0.rc2 test/support/discovery_inputs.rb