From 5e0c1cc5ce9e16f3b4d8d2066bc1c4023afdee78 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Thu, 9 Feb 2012 18:22:11 +0000 Subject: 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 --- app/models/custom_field.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'app/models/custom_field.rb') 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 -- cgit v1.2.3