Fixed: Comment too long message when updating issue (#1550).

git-svn-id: http://redmine.rubyforge.org/svn/trunk@1608 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang 2008-06-30 17:31:50 +00:00
parent b29b39290a
commit ee608f24f4
1 changed files with 1 additions and 1 deletions

View File

@ -32,7 +32,7 @@ class TimeEntry < ActiveRecord::Base
validates_presence_of :user_id, :activity_id, :project_id, :hours, :spent_on
validates_numericality_of :hours, :allow_nil => true
validates_length_of :comments, :maximum => 255
validates_length_of :comments, :maximum => 255, :allow_nil => true
def after_initialize
if new_record? && self.activity.nil?