Replaces Enumeration.get_values and Enumeration.default with named scopes.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2472 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
1 parent
13e2c727cf
commit
4601ed2f3a
17 files changed
+51
-39
No files matched your search
@@ -37,7 +37,7 @@ class TimeEntry < ActiveRecord::Base
|
||||
|
||||
def after_initialize
|
||||
if new_record? && self.activity.nil?
|
||||
if default_activity = Enumeration.default('ACTI')
|
||||
if default_activity = Enumeration.activities.default
|
||||
self.activity_id = default_activity.id
|
||||
end
|
||||
end
|
||||
|
||||
Reference in new issue
Block a user