diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2013-05-01 16:43:51 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2013-05-01 16:43:51 +0000 |
commit | 6c39a260a3c44c1d121a7421b1d6c09358da20a1 (patch) | |
tree | 18e57bf180867625ea204fb7a3b0cc9e272229f1 | |
parent | 5cc597e394a76fc03c9a8897d8eac9ded4cb10ea (diff) | |
download | redmine-6c39a260a3c44c1d121a7421b1d6c09358da20a1.tar.gz redmine-6c39a260a3c44c1d121a7421b1d6c09358da20a1.zip |
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
-rw-r--r-- | app/controllers/enumerations_controller.rb | 2 | ||||
-rw-r--r-- | app/models/enumeration.rb | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/app/controllers/enumerations_controller.rb b/app/controllers/enumerations_controller.rb index 4e5475bec..125e87cff 100644 --- a/app/controllers/enumerations_controller.rb +++ b/app/controllers/enumerations_controller.rb @@ -77,7 +77,7 @@ class EnumerationsController < ApplicationController return end end - @enumerations = @enumeration.class.all - [@enumeration] + @enumerations = @enumeration.class.system.all - [@enumeration] end private diff --git a/app/models/enumeration.rb b/app/models/enumeration.rb index 1946735ec..7e8bf5a81 100644 --- a/app/models/enumeration.rb +++ b/app/models/enumeration.rb @@ -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 |