From 8065001c0db96c5cc0e1ea45b20b909fb84541fc Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Tue, 24 Apr 2007 16:17:57 +0000 Subject: [PATCH] Fixed 10335 Error in journalizing an issue with longtext custom fields (Postgresql) git-svn-id: http://redmine.rubyforge.org/svn/trunk@477 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/models/journal_detail.rb | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/models/journal_detail.rb b/app/models/journal_detail.rb index 784e98bf7..831f953ae 100644 --- a/app/models/journal_detail.rb +++ b/app/models/journal_detail.rb @@ -17,4 +17,9 @@ 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 + end end