summaryrefslogtreecommitdiffstats
path: root/app/models/custom_field.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2012-02-09 18:22:11 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2012-02-09 18:22:11 +0000
commit5e0c1cc5ce9e16f3b4d8d2066bc1c4023afdee78 (patch)
tree4814399d770b5f3fe3197841c3bcf9689ab0e149 /app/models/custom_field.rb
parentde7c49c6ca79f87b697744688d57a07e7af17b4c (diff)
downloadredmine-5e0c1cc5ce9e16f3b4d8d2066bc1c4023afdee78.tar.gz
redmine-5e0c1cc5ce9e16f3b4d8d2066bc1c4023afdee78.zip
Bulk-edit custom fields through context menu (#6296).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8824 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/models/custom_field.rb')
-rw-r--r--app/models/custom_field.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/app/models/custom_field.rb b/app/models/custom_field.rb
index b8005fea1..8011320b3 100644
--- a/app/models/custom_field.rb
+++ b/app/models/custom_field.rb
@@ -77,8 +77,10 @@ class CustomField < ActiveRecord::Base
else
[]
end
+ when 'bool'
+ [[l(:general_text_Yes), '1'], [l(:general_text_No), '0']]
else
- read_attribute :possible_values
+ read_attribute(:possible_values) || []
end
end
@@ -86,6 +88,8 @@ class CustomField < ActiveRecord::Base
case field_format
when 'user', 'version'
possible_values_options(obj).collect(&:last)
+ when 'bool'
+ ['1', '0']
else
read_attribute :possible_values
end