Method: Validatable::Errors#full_messages
- Defined in:
- lib/errors.rb
#full_messages ⇒ Object
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 = [] errors.each_key do |attribute| errors[attribute].each do |msg| next if msg.nil? if attribute.to_s == "base" << msg else << humanize(attribute.to_s) + " " + msg end end end end |