Added helper functions to base journal class

This commit is contained in:
Holger Just 2010-06-29 19:39:28 +02:00
parent bcbb328cd2
commit f2957176bf
1 changed files with 8 additions and 0 deletions

View File

@ -12,4 +12,12 @@ class Journal < ActiveRecord::Base
# Do not save an empty journal
!(details.empty? && notes.blank?)
end
def journalized
nil
end
def project
journalized.respond_to?('project') ? journalized.project: nil
end
end