From b80bd744ad873f6fc43018bc4bfb90677de167bd Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Mon, 17 Dec 2012 12:01:45 +0100 Subject: Start of GS5. --- config/initializers/simple_form.rb | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 config/initializers/simple_form.rb (limited to 'config/initializers/simple_form.rb') 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 -- cgit v1.2.3