Permalink
Browse files

Remove dots from validation errors

Closes #133, Closes 288
  • Loading branch information...
1 parent dcdcb83 commit ce9ee130929ba4433390b1f564f08a472d7cd921 @sikachu sikachu committed Jun 30, 2011
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/paperclip.rb
View
@@ -302,7 +302,7 @@ def validates_attachment_size name, options = {}
min = options[:greater_than] || (options[:in] && options[:in].first) || 0
max = options[:less_than] || (options[:in] && options[:in].last) || (1.0/0)
range = (min..max)
- message = options[:message] || "file size must be between :min and :max bytes."
+ message = options[:message] || "file size must be between :min and :max bytes"
message = message.call if message.respond_to?(:call)
message = message.gsub(/:min/, min.to_s).gsub(/:max/, max.to_s)
@@ -328,7 +328,7 @@ def validates_attachment_thumbnails name, options = {}
# be run is this lambda or method returns true.
# * +unless+: Same as +if+ but validates if lambda or method returns false.
def validates_attachment_presence name, options = {}
- message = options[:message] || "must be set."
+ message = options[:message] || "must be set"
validates_presence_of :"#{name}_file_name",
:message => message,
:if => options[:if],

0 comments on commit ce9ee13

Please sign in to comment.