diff options
Diffstat (limited to 'app/models/version.rb')
-rw-r--r-- | app/models/version.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/app/models/version.rb b/app/models/version.rb index dfa8af1ee..ad3d816fb 100644 --- a/app/models/version.rb +++ b/app/models/version.rb @@ -197,6 +197,13 @@ class Version < ActiveRecord::Base end end + def css_classes + [ + completed? ? 'version-completed' : 'version-incompleted', + "version-#{status}" + ].join(' ') + end + def self.fields_for_order_statement(table=nil) table ||= table_name ["(CASE WHEN #{table}.effective_date IS NULL THEN 1 ELSE 0 END)", "#{table}.effective_date", "#{table}.name", "#{table}.id"] |