Better message for file size validation error.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8937 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2012-02-23 12:18:10 +00:00
parent 9774782cab
commit 7e347069d5
2 changed files with 12 additions and 1 deletions
+1 -1
View File
@@ -68,7 +68,7 @@ class Attachment < ActiveRecord::Base
def validate_max_file_size
if @temp_file && self.filesize > Setting.attachment_max_size.to_i.kilobytes
errors.add(:base, :too_long, :count => Setting.attachment_max_size.to_i.kilobytes)
errors.add(:base, l(:error_attachment_too_big, :max_size => Setting.attachment_max_size.to_i.kilobytes))
end
end