Module: SimpleFormFormBuilderExtensions
- Defined in:
- app/extensions/concerns/simple_form_form_builder_extensions.rb
Overview
:nodoc:
Instance Method Summary collapse
Instance Method Details
#editor(*args) ⇒ Object
3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
# File 'app/extensions/concerns/simple_form_form_builder_extensions.rb', line 3 def editor(*args) = args. syntax = .delete(:syntax) input_html = .key?(:input_html) ? [:input_html] : {} input_html['data-add-editor'] = true input_html['data-editor-syntax'] = syntax if syntax.present? [:input_html] = input_html input(*args, ) end |
#locale_input(attribute_name = :locale, _ = {}) ⇒ Object
18 19 20 21 22 23 24 25 26 27 |
# File 'app/extensions/concerns/simple_form_form_builder_extensions.rb', line 18 def locale_input(attribute_name = :locale, _ = {}) = { collection: I18n.available_locales, as: :radio_buttons, item_label_class: 'radio-inline', item_wrapper_tag: false } input attribute_name, end |