Sha256: b5c4441b42af269828f5f860fb76b869f042a7660a4781863ce21b96c878a47a

Contents?: true

Size: 665 Bytes

Versions: 46

Compression:

Stored size: 665 Bytes

Contents

# :nodoc:
module SimpleFormFormBuilderExtensions
  def editor(*args)
    options = args.extract_options!
    syntax = options.delete(:syntax)

    input_html = options.key?(:input_html) ? options[:input_html] : {}

    input_html['data-add-editor'] = true

    input_html['data-editor-syntax'] = syntax if syntax.present?

    options[:input_html] = input_html

    input(*args, options)
  end

  def locale_input(attribute_name = :locale, _ = {})
    input_options = {
      collection: I18n.available_locales,
      as: :radio_buttons,
      item_label_class: 'radio-inline',
      item_wrapper_tag: false
    }

    input attribute_name, input_options
  end
end

Version data entries

46 entries across 46 versions & 1 rubygems

Version Path
itsf_backend-5.0.0.pre app/extensions/concerns/simple_form_form_builder_extensions.rb
itsf_backend-4.2.3 app/extensions/concerns/simple_form_form_builder_extensions.rb
itsf_backend-4.2.2 app/extensions/concerns/simple_form_form_builder_extensions.rb
itsf_backend-4.2.1 app/extensions/concerns/simple_form_form_builder_extensions.rb
itsf_backend-4.2.0 app/extensions/concerns/simple_form_form_builder_extensions.rb
itsf_backend-4.0.1 app/extensions/concerns/simple_form_form_builder_extensions.rb
itsf_backend-4.0.0 app/extensions/concerns/simple_form_form_builder_extensions.rb
itsf_backend-3.1.1 app/extensions/concerns/simple_form_form_builder_extensions.rb
itsf_backend-3.1.0 app/extensions/concerns/simple_form_form_builder_extensions.rb
itsf_backend-3.0.7 app/extensions/concerns/simple_form_form_builder_extensions.rb
itsf_backend-3.0.6 app/extensions/concerns/simple_form_form_builder_extensions.rb
itsf_backend-3.0.5 app/extensions/concerns/simple_form_form_builder_extensions.rb
itsf_backend-3.0.4 app/extensions/concerns/simple_form_form_builder_extensions.rb
itsf_backend-3.0.3 app/extensions/concerns/simple_form_form_builder_extensions.rb
itsf_backend-3.0.2 app/extensions/concerns/simple_form_form_builder_extensions.rb
itsf_backend-3.0.1 app/extensions/concerns/simple_form_form_builder_extensions.rb
itsf_backend-3.0.0 app/extensions/concerns/simple_form_form_builder_extensions.rb
itsf_backend-2.2.1 app/extensions/concerns/simple_form_form_builder_extensions.rb
itsf_backend-2.2.0 app/extensions/concerns/simple_form_form_builder_extensions.rb
itsf_backend-2.1.0 app/extensions/concerns/simple_form_form_builder_extensions.rb