class Para::ModelFieldParsers::Devise

Public Instance Methods

applicable?() click to toggle source
# File lib/para/model_field_parsers/devise.rb, line 14
def applicable?
  fields_hash.key?(:encrypted_password)
end
parse!() click to toggle source
# File lib/para/model_field_parsers/devise.rb, line 6
def parse!
  hidden_fields.each(&fields_hash.method(:delete))

  added_fields.each do |key|
    fields_hash[key] = AttributeField::PasswordField.new(model, name: key)
  end
end

Private Instance Methods

added_fields() click to toggle source
# File lib/para/model_field_parsers/devise.rb, line 29
def added_fields
  [
    :password,
    :password_confirmation
  ]
end
hidden_fields() click to toggle source
# File lib/para/model_field_parsers/devise.rb, line 20
def hidden_fields
  [
    :encrypted_password,
    :password_salt,
    :reset_password_token,
    :remember_token
  ]
end