Sha256: 1fdaf2238111eb60aecab37c217d02f04122eb6643df0db270b3ed5568e93327

Contents?: true

Size: 1.16 KB

Versions: 11

Compression:

Stored size: 1.16 KB

Contents

require 'rails_admin/config/fields/base'

module RailsAdmin
  module Config
    module Fields
      module Types
        class Wysihtml5 < RailsAdmin::Config::Fields::Types::Text
          # Register field type for the type loader
          RailsAdmin::Config::Fields::Types.register(self)

          # If you want to have a different toolbar configuration for wysihtml5
          # you can use a Ruby hash to configure these options:
          # https://github.com/jhollingworth/bootstrap-wysihtml5/#advanced
          register_instance_option :config_options do
            nil
          end

          register_instance_option :css_location do
            ActionController::Base.helpers.asset_path('bootstrap-wysihtml5.css')
          end

          register_instance_option :js_location do
            ActionController::Base.helpers.asset_path('bootstrap-wysihtml5.js')
          end

          register_instance_option :partial do
            :form_wysihtml5
          end

          [:config_options, :css_location, :js_location].each do |key|
            register_deprecated_instance_option :"bootstrap_wysihtml5_#{key}", key
          end
        end
      end
    end
  end
end

Version data entries

11 entries across 11 versions & 2 rubygems

Version Path
rails_admin-0.8.1 lib/rails_admin/config/fields/types/wysihtml5.rb
sc_core-0.0.7 test/dummy/vendor/bundle/ruby/2.2.0/gems/rails_admin-0.7.0/lib/rails_admin/config/fields/types/wysihtml5.rb
rails_admin-0.7.0 lib/rails_admin/config/fields/types/wysihtml5.rb
rails_admin-0.6.8 lib/rails_admin/config/fields/types/wysihtml5.rb
rails_admin-0.6.7 lib/rails_admin/config/fields/types/wysihtml5.rb
rails_admin-0.6.6 lib/rails_admin/config/fields/types/wysihtml5.rb
rails_admin-0.6.5 lib/rails_admin/config/fields/types/wysihtml5.rb
rails_admin-0.6.4 lib/rails_admin/config/fields/types/wysihtml5.rb
rails_admin-0.6.3 lib/rails_admin/config/fields/types/wysihtml5.rb
rails_admin-0.6.2 lib/rails_admin/config/fields/types/wysihtml5.rb
rails_admin-0.6.1 lib/rails_admin/config/fields/types/wysihtml5.rb