Sha256: 2b5a34ce4d7582b32d9f4e915c047dad073a3f130ab1819d650533fcc661c26c

Contents?: true

Size: 509 Bytes

Versions: 12

Compression:

Stored size: 509 Bytes

Contents

# frozen_string_literal: true

require 'rails_admin/config/fields'
require 'rails_admin/config/fields/types'

RailsAdmin::Config::Fields.register_factory do |parent, properties, fields|
  if defined?(::ActionText) && properties.try(:association?) && (match = /\Arich_text_(.+)\Z/.match properties.name) && properties.klass.to_s == 'ActionText::RichText'
    field = RailsAdmin::Config::Fields::Types.load(:action_text).new(parent, match[1], properties)
    fields << field
    true
  else
    false
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
rails_admin-3.2.1 lib/rails_admin/config/fields/factories/action_text.rb
rails_admin-3.2.0 lib/rails_admin/config/fields/factories/action_text.rb
rails_admin-3.2.0.rc lib/rails_admin/config/fields/factories/action_text.rb
rails_admin-3.2.0.beta lib/rails_admin/config/fields/factories/action_text.rb
rails_admin-3.1.4 lib/rails_admin/config/fields/factories/action_text.rb
rails_admin-3.1.3 lib/rails_admin/config/fields/factories/action_text.rb
rails_admin-3.1.2 lib/rails_admin/config/fields/factories/action_text.rb
rails_admin-3.1.1 lib/rails_admin/config/fields/factories/action_text.rb
rails_admin-3.1.0 lib/rails_admin/config/fields/factories/action_text.rb
rails_admin-3.1.0.rc2 lib/rails_admin/config/fields/factories/action_text.rb
rails_admin-3.1.0.rc lib/rails_admin/config/fields/factories/action_text.rb
rails_admin-3.1.0.beta lib/rails_admin/config/fields/factories/action_text.rb