Anexos aninhados

This commit is contained in:
2009-09-06 21:00:20 -03:00
11 changed files with 108 additions and 27 deletions

View File

@@ -1,20 +1,20 @@
module ActiveRecord
class Errors
def full_messages
full_messages = []
@errors.each_key do |attr|
@errors[attr].each do |msg|
next if msg.nil?
if attr == "base"
full_messages << msg
else
full_messages << @base.class.human_attribute_name(attr.send("[]")) + " " + msg
end
end
end
full_messages
end
end
end
#module ActiveRecord
# class Errors
# def full_messages
# full_messages = []
#
# @errors.each_key do |attr|
# @errors[attr].each do |msg|
# next if msg.nil?
#
# if attr == "base"
# full_messages << msg
# else
# full_messages << @base.class.human_attribute_name(attr.send("[]")) + " " + msg
# end
# end
# end
# full_messages
# end
# end
#end