diff options
Diffstat (limited to 'config/initializers/simple_form.rb')
-rw-r--r-- | config/initializers/simple_form.rb | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/config/initializers/simple_form.rb b/config/initializers/simple_form.rb new file mode 100644 index 0000000..2e3d9fb --- /dev/null +++ b/config/initializers/simple_form.rb @@ -0,0 +1,19 @@ +# Use this setup block to configure all options available in SimpleForm. +SimpleForm.setup do |config| + config.wrappers :tag => :div, :class => :input, + :error_class => :field_with_errors do |b| + + # Form extensions + b.use :html5 + b.optional :pattern + b.use :maxlength + b.use :placeholder + b.use :readonly + + # Form components + b.use :label_input + b.use :error, :wrap_with => { :tag => :span, :class => :error } + b.use :hint, :wrap_with => { :tag => :span, :class => :hint } + end + +end |