Journal details truncated only if values are strings

git-svn-id: http://redmine.rubyforge.org/svn/trunk@478 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang 2007-04-24 18:26:42 +00:00
parent 8065001c0d
commit 4967fa8733
1 changed files with 2 additions and 2 deletions

View File

@ -19,7 +19,7 @@ class JournalDetail < ActiveRecord::Base
belongs_to :journal
def before_save
self.value = value[0..254] if value
self.old_value = old_value[0..254] if old_value
self.value = value[0..254] if value && value.is_a?(String)
self.old_value = old_value[0..254] if old_value && old_value.is_a?(String)
end
end