summaryrefslogtreecommitdiffstats
path: root/app/controllers/context_menus_controller.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2013-12-14 08:57:30 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2013-12-14 08:57:30 +0000
commitebb8e8612254b4e5bb4b8121530064cd140a1ece (patch)
treeb98172741609b838a982782e450b679566f96c27 /app/controllers/context_menus_controller.rb
parent32f782f1aad8f57b3afd1be300bf7295ac474ac4 (diff)
downloadredmine-ebb8e8612254b4e5bb4b8121530064cd140a1ece.tar.gz
redmine-ebb8e8612254b4e5bb4b8121530064cd140a1ece.zip
Removed hardcoded formats for right-click edit.
git-svn-id: http://svn.redmine.org/redmine/trunk@12402 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/controllers/context_menus_controller.rb')
-rw-r--r--app/controllers/context_menus_controller.rb6
1 files changed, 2 insertions, 4 deletions
diff --git a/app/controllers/context_menus_controller.rb b/app/controllers/context_menus_controller.rb
index 8f6fc1cb4..99d0be7d7 100644
--- a/app/controllers/context_menus_controller.rb
+++ b/app/controllers/context_menus_controller.rb
@@ -55,12 +55,10 @@ class ContextMenusController < ApplicationController
@options_by_custom_field = {}
if @can[:edit]
- custom_fields = @issues.map(&:available_custom_fields).reduce(:&).select do |f|
- %w(bool list user version).include?(f.field_format) && !f.multiple?
- end
+ custom_fields = @issues.map(&:available_custom_fields).reduce(:&).reject(&:multiple?)
custom_fields.each do |field|
values = field.possible_values_options(@projects)
- if values.any?
+ if values.present?
@options_by_custom_field[field] = values
end
end