Propose system activities only when reassigning time entries (#13783).

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@11762 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang 2013-05-01 16:43:51 +00:00
parent 5cc597e394
commit 6c39a260a3
2 changed files with 2 additions and 1 deletions

View File

@ -77,7 +77,7 @@ class EnumerationsController < ApplicationController
return
end
end
@enumerations = @enumeration.class.all - [@enumeration]
@enumerations = @enumeration.class.system.all - [@enumeration]
end
private

View File

@ -38,6 +38,7 @@ class Enumeration < ActiveRecord::Base
scope :shared, lambda { where(:project_id => nil) }
scope :sorted, lambda { order("#{table_name}.position ASC") }
scope :active, lambda { where(:active => true) }
scope :system, lambda { where(:project_id => nil) }
scope :named, lambda {|arg| where("LOWER(#{table_name}.name) = LOWER(?)", arg.to_s.strip)}
def self.default