class Administrate::Field::Password

Public Class Methods

searchable?() click to toggle source
# File lib/administrate/field/password.rb, line 6
def self.searchable?
  false
end

Public Instance Methods

truncate() click to toggle source
# File lib/administrate/field/password.rb, line 10
def truncate
  data.to_s.gsub(/./, character)[0...truncation_length]
end

Private Instance Methods

character() click to toggle source
# File lib/administrate/field/password.rb, line 20
def character
  options.fetch(:character, "•")
end
truncation_length() click to toggle source
# File lib/administrate/field/password.rb, line 16
def truncation_length
  options.fetch(:truncate, 50)
end