summaryrefslogtreecommitdiffstats
path: root/app/models/journal.rb
diff options
context:
space:
mode:
authorEric Davis <edavis@littlestreamsoftware.com>2010-09-05 22:57:20 +0000
committerEric Davis <edavis@littlestreamsoftware.com>2010-09-05 22:57:20 +0000
commitdb110304105a7758ee2d3be496c91d037f16425f (patch)
treed63e0910e76753cdf9ac72a93868787edab78307 /app/models/journal.rb
parentcbe266079e9105c61bbda84c5cef89927548fcfe (diff)
downloadredmine-db110304105a7758ee2d3be496c91d037f16425f.tar.gz
redmine-db110304105a7758ee2d3be496c91d037f16425f.zip
Refactor: move method to model. (references r4057)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4062 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/models/journal.rb')
-rw-r--r--app/models/journal.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/app/models/journal.rb b/app/models/journal.rb
index a0e1ae877..3e846aeb8 100644
--- a/app/models/journal.rb
+++ b/app/models/journal.rb
@@ -65,4 +65,12 @@ class Journal < ActiveRecord::Base
def attachments
journalized.respond_to?(:attachments) ? journalized.attachments : nil
end
+
+ # Returns a string of css classes
+ def css_classes
+ s = 'journal'
+ s << ' has-notes' unless notes.blank?
+ s << ' has-details' unless details.blank?
+ s
+ end
end