Sha256: 25eade386f8a19f32dd9a38ed191e2382cdff0a8a0310c459548460ffa91cb6d
Contents?: true
Size: 947 Bytes
Versions: 20
Compression:
Stored size: 947 Bytes
Contents
require 'rails_admin/config/fields/types/string' module RailsAdmin module Config module Fields module Types class Password < RailsAdmin::Config::Fields::Types::String # Register field type for the type loader RailsAdmin::Config::Fields::Types.register(self) register_instance_option :view_helper do :password_field end def parse_input(params) params[name] = params[name].presence end register_instance_option :formatted_value do ''.html_safe end # Password field's value does not need to be read def value '' end register_instance_option :visible do section.is_a?(RailsAdmin::Config::Sections::Edit) end register_instance_option :pretty_value do '*****' end end end end end end
Version data entries
20 entries across 20 versions & 2 rubygems