Sha256: 456f886bf0dba6dead55abde17e8b8a8b788efefebfcf96d27823feaa294e92f

Contents?: true

Size: 618 Bytes

Versions: 4

Compression:

Stored size: 618 Bytes

Contents

# -*- encoding: utf-8 -*-
# -*- frozen_string_literal: true -*-
# -*- warn_indent: true -*-

module RailsBootstrapForm
  module Inputs
    module RichTextArea
      extend ActiveSupport::Concern

      included do
        def rich_text_area(attribute, options = {})
          bootstrap = bootstrap_form_options.scoped(options.delete(:bootstrap))
          return super if bootstrap.disabled?

          bootstrap.set_field_class!("trix-content form-control")

          field_wrapper_builder(attribute, bootstrap, options) do
            super(attribute, options)
          end
        end
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
rails_bootstrap_form-0.9.9 lib/rails_bootstrap_form/inputs/rich_text_area.rb
rails_bootstrap_form-0.9.8 lib/rails_bootstrap_form/inputs/rich_text_area.rb
rails_bootstrap_form-0.9.7 lib/rails_bootstrap_form/inputs/rich_text_area.rb
rails_bootstrap_form-0.9.6 lib/rails_bootstrap_form/inputs/rich_text_area.rb