diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2012-07-15 14:50:38 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2012-07-15 14:50:38 +0000 |
commit | 88e1ae892cd9d89f3632664b888f859538c7f007 (patch) | |
tree | e9a93e35e30e2f1560daeeeb9eeecc81ec9a3e65 /app | |
parent | 7f0bb136ad114e7772e7b1fb1c4210826f7a114f (diff) | |
download | redmine-88e1ae892cd9d89f3632664b888f859538c7f007.tar.gz redmine-88e1ae892cd9d89f3632664b888f859538c7f007.zip |
ruby1.8 compatibility (#703, #3521).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9985 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app')
-rw-r--r-- | app/models/issue.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/models/issue.rb b/app/models/issue.rb index 152953708..42c833c11 100644 --- a/app/models/issue.rb +++ b/app/models/issue.rb @@ -420,7 +420,7 @@ class Issue < ActiveRecord::Base # issue.read_only_attribute_names # => ['due_date', '2'] # issue.read_only_attribute_names(user) # => [] def read_only_attribute_names(user=nil) - workflow_rule_by_attribute(user).select {|attr, rule| rule == 'readonly'}.keys + workflow_rule_by_attribute(user).reject {|attr, rule| rule != 'readonly'}.keys end # Returns the names of required attributes for user or the current user @@ -432,7 +432,7 @@ class Issue < ActiveRecord::Base # issue.required_attribute_names # => ['due_date', '2'] # issue.required_attribute_names(user) # => [] def required_attribute_names(user=nil) - workflow_rule_by_attribute(user).select {|attr, rule| rule == 'required'}.keys + workflow_rule_by_attribute(user).reject {|attr, rule| rule != 'required'}.keys end # Returns true if the attribute is required for user |