Integration of Simple-form 2.0.0 and Zurb

The new simple_form (2.0.0) style has a wrapper for twitter. But I prefer to use zurb-foundation. Therefore, I am trying to create this shell.

Does anyone have input to create a wrapper?

+4
source share
2 answers

You need to change the following lines in /config/initializers/simple_form.rb :

 config.wrappers :default, :class => :input, :hint_class => :field_with_hint, :error_class => :field_with_errors do |b| ... b.use :hint, :wrap_with => { :tag => :span, :class => :hint } b.use :error, :wrap_with => { :tag => :span, :class => :error } ... config.error_notification_class = 'alert alert-error' 

for

 config.wrappers :default, :class => :input, :hint_class => :field_with_hint, :error_class => :errors do |b| ... b.use :error, :wrap_with => { :tag => :small } ... # delete hint config.error_notification_class = 'alert-box alert' 

You can see the diff here .

+4
source

Source: https://habr.com/ru/post/1397846/


All Articles