wblog/config/initializers/simple_form.rb

20 lines
626 B
Ruby
Raw Permalink Normal View History

2014-12-31 01:02:31 +08:00
# Use this setup block to configure all options available in SimpleForm.
SimpleForm.setup do |config|
config.wrappers :default, class: :input,
hint_class: :field_with_hint, error_class: :field_with_errors do |b|
b.use :html5
b.use :placeholder
b.use :label_input
b.use :hint, wrap_with: { tag: :span, class: :hint }
2016-04-26 00:20:14 +08:00
b.use :error, wrap_with: { tag: :span, class: 'form-error is-visible' }
2014-12-31 01:02:31 +08:00
end
config.default_wrapper = :default
config.boolean_style = :nested
config.button_class = 'button'
config.error_notification_tag = :div
config.error_notification_class = 'error_notification'
end