Added an active field track if an Enumeration is active on the frontend view.
* Changed TimelogHelper#activity_collection_for_select_options to only use active TimeEntryActivities. * Changed TimelogHelper#activity_collection_for_select_options to return a blank option if the time_entry's current activity is inactive. #4077 git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2946 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -53,9 +53,17 @@ class Enumeration < ActiveRecord::Base
|
||||
find(:first, :conditions => { :is_default => true })
|
||||
end
|
||||
end
|
||||
# End backwards compatiblity named_scopes
|
||||
|
||||
named_scope :all, :order => 'position'
|
||||
|
||||
named_scope :active, lambda {
|
||||
{
|
||||
:conditions => {:active => true},
|
||||
:order => 'position'
|
||||
}
|
||||
}
|
||||
|
||||
def self.default
|
||||
# Creates a fake default scope so Enumeration.default will check
|
||||
# it's type. STI subclasses will automatically add their own
|
||||
|
||||
Reference in New Issue
Block a user