I am trying to have class=\"text\"
in my input fields when using a custom wrapper called :hinted in simple_form 2.0.0.rc
config.wrappers :hinted do
This feature is about to be merged to master right now (Oct. 2012):
https://github.com/plataformatec/simple_form/pull/622
Then you can do something like this to add HTML attributes directly on the input field:
SimpleForm.build :tag => :div, :class => "custom_wrapper" do |b|
b.wrapper :tag => :div, :class => 'elem' do |component|
component.use :input, :class => ['input_class_yo', 'other_class_yo']
component.use :label, :"data-yo" => 'yo'
component.use :label_input, :class => 'both_yo'
component.use :custom_component, :class => 'custom_yo'
end
end