Makes the error message localized by default.

parent 24cc2781
...@@ -328,7 +328,7 @@ module Paperclip ...@@ -328,7 +328,7 @@ module Paperclip
# be run is this lambda or method returns true. # be run is this lambda or method returns true.
# * +unless+: Same as +if+ but validates if lambda or method returns false. # * +unless+: Same as +if+ but validates if lambda or method returns false.
def validates_attachment_presence name, options = {} def validates_attachment_presence name, options = {}
message = options[:message] || "must be set" message = options[:message] || :empty
validates_presence_of :"#{name}_file_name", validates_presence_of :"#{name}_file_name",
:message => message, :message => message,
:if => options[:if], :if => options[:if],
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment