1
0
mirror of https://github.com/meineerde/redmine.git synced 2026-03-11 03:33:07 +00:00
redmine/app/models/journal.rb
2010-06-18 19:31:21 +02:00

16 lines
290 B
Ruby

class Journal < ActiveRecord::Base
self.abstract_class = true
belongs_to :user
serialize :details
attr_accessor :indice
before_save :check_for_empty_journal
def check_for_empty_journal
# Do not save an empty journal
!(details.empty? && notes.blank?)
end
end