Method: Validatable::Errors#full_messages

Defined in:
lib/errors.rb

#full_messagesObject

call-seq: full_messages -> an_array_of_messages

Returns an array containing the full list of error messages.



53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
# File 'lib/errors.rb', line 53

def full_messages
  full_messages = []

  errors.each_key do |attribute|
    errors[attribute].each do |msg|
      next if msg.nil?

      if attribute.to_s == "base"
        full_messages << msg
      else
        full_messages << humanize(attribute.to_s) + " " + msg
      end
    end
  end
  full_messages
end