2006-11-28 01:31:14 +03:00
|
|
|
# redMine - project management software
|
|
|
|
# Copyright (C) 2006 Jean-Philippe Lang
|
|
|
|
#
|
|
|
|
# This program is free software; you can redistribute it and/or
|
|
|
|
# modify it under the terms of the GNU General Public License
|
|
|
|
# as published by the Free Software Foundation; either version 2
|
|
|
|
# of the License, or (at your option) any later version.
|
|
|
|
#
|
|
|
|
# This program is distributed in the hope that it will be useful,
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
# GNU General Public License for more details.
|
|
|
|
#
|
|
|
|
# You should have received a copy of the GNU General Public License
|
|
|
|
# along with this program; if not, write to the Free Software
|
|
|
|
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
|
|
|
|
|
|
class JournalDetail < ActiveRecord::Base
|
|
|
|
belongs_to :journal
|
2007-04-24 20:17:57 +04:00
|
|
|
|
|
|
|
def before_save
|
2007-04-24 22:26:42 +04:00
|
|
|
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)
|
2007-04-24 20:17:57 +04:00
|
|
|
end
|
2006-11-28 01:31:14 +03:00
|
|
|
end
|