module CopDetective::ErrorMessages

Public Class Methods

formatting() click to toggle source
# File lib/errors.rb, line 16
      def formatting
        <<-MESSAGE 
        The keys in the hash you pass to #set_keys must be as follows:
          password:
          confirmation:
          old_password:

        the values you pass should reflect keys in your params hash.
        a correctly configured hash would look similar to this:
        {
          password: :new_password,
          confirmation: :password_again,
          old_password: :original_password
        }
        MESSAGE
      end
invalid_password() click to toggle source
# File lib/errors.rb, line 8
def invalid_password
  "You entered your original password incorrectly."
end
non_matching() click to toggle source
# File lib/errors.rb, line 33
def non_matching
  "Your new passwords don't match."
end
options_error(key) click to toggle source
# File lib/errors.rb, line 37
def options_error(key)
  "Option passed to #{key} must be a symbol or string."
end
unsaved_password(reason) click to toggle source
# File lib/errors.rb, line 4
def unsaved_password(reason)
  "Your new password was not saved. #{reason}"
end
wrong_datatype() click to toggle source
# File lib/errors.rb, line 12
def wrong_datatype
  'You must pass a hash to the set_keys method'
end