Sha256: b9ce375226b1704e3358df78e74184b620fb78c378496f8a24ac6b5d93b06a31

Contents?: true

Size: 660 Bytes

Versions: 12

Compression:

Stored size: 660 Bytes

Contents

# frozen_string_literal: true

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

# Register a custom field factory for properties named as password. More property
# names can be registered in RailsAdmin::Config::Fields::Password.column_names
# array.
#
# @see RailsAdmin::Config::Fields::Types::Password.column_names
# @see RailsAdmin::Config::Fields.register_factory
RailsAdmin::Config::Fields.register_factory do |parent, properties, fields|
  if [:password].include?(properties.name)
    fields << RailsAdmin::Config::Fields::Types::Password.new(parent, properties.name, properties)
    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/password.rb
rails_admin-3.2.0 lib/rails_admin/config/fields/factories/password.rb
rails_admin-3.2.0.rc lib/rails_admin/config/fields/factories/password.rb
rails_admin-3.2.0.beta lib/rails_admin/config/fields/factories/password.rb
rails_admin-3.1.4 lib/rails_admin/config/fields/factories/password.rb
rails_admin-3.1.3 lib/rails_admin/config/fields/factories/password.rb
rails_admin-3.1.2 lib/rails_admin/config/fields/factories/password.rb
rails_admin-3.1.1 lib/rails_admin/config/fields/factories/password.rb
rails_admin-3.1.0 lib/rails_admin/config/fields/factories/password.rb
rails_admin-3.1.0.rc2 lib/rails_admin/config/fields/factories/password.rb
rails_admin-3.1.0.rc lib/rails_admin/config/fields/factories/password.rb
rails_admin-3.1.0.beta lib/rails_admin/config/fields/factories/password.rb