commit
62993fbbe4
@ -0,0 +1,9 @@
|
|||||||
|
class Folders < ActiveRecord::Migration
|
||||||
|
def self.up
|
||||||
|
add_column :attachments, :path, :string
|
||||||
|
end
|
||||||
|
|
||||||
|
def self.down
|
||||||
|
remove_column :attachments, :path
|
||||||
|
end
|
||||||
|
end
|
@ -1,20 +1,20 @@
|
|||||||
module ActiveRecord
|
#module ActiveRecord
|
||||||
class Errors
|
# class Errors
|
||||||
def full_messages
|
# def full_messages
|
||||||
full_messages = []
|
# full_messages = []
|
||||||
|
#
|
||||||
@errors.each_key do |attr|
|
# @errors.each_key do |attr|
|
||||||
@errors[attr].each do |msg|
|
# @errors[attr].each do |msg|
|
||||||
next if msg.nil?
|
# next if msg.nil?
|
||||||
|
#
|
||||||
if attr == "base"
|
# if attr == "base"
|
||||||
full_messages << msg
|
# full_messages << msg
|
||||||
else
|
# else
|
||||||
full_messages << @base.class.human_attribute_name(attr.send("[]")) + " " + msg
|
# full_messages << @base.class.human_attribute_name(attr.send("[]")) + " " + msg
|
||||||
end
|
# end
|
||||||
end
|
# end
|
||||||
end
|
# end
|
||||||
full_messages
|
# full_messages
|
||||||
end
|
# end
|
||||||
end
|
# end
|
||||||
end
|
#end
|
||||||
|
Reference in new issue