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:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user