Sha256: 6de935fea6984f22527c028b9a22f4739f60d25094c48cf8a8f20f3d4f77f1a4

Contents?: true

Size: 678 Bytes

Versions: 3

Compression:

Stored size: 678 Bytes

Contents

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 RailsAdmin::Config::Fields::Types::Password.column_names.include?(properties[:name])
    fields << RailsAdmin::Config::Fields::Types::Password.new(parent, properties[:name], properties)
    true
  else
    false
  end
end

Version data entries

3 entries across 3 versions & 2 rubygems

Version Path
obitum-rails_admin-0.0.2 lib/rails_admin/config/fields/factories/password.rb
obitum-rails_admin-0.0.1 lib/rails_admin/config/fields/factories/password.rb
elucid-rails_admin-0.0.1 lib/rails_admin/config/fields/factories/password.rb