diff options
author | Go MAEDA <maeda@farend.jp> | 2019-08-17 02:23:51 +0000 |
---|---|---|
committer | Go MAEDA <maeda@farend.jp> | 2019-08-17 02:23:51 +0000 |
commit | 78d3d6c223709b1fe370a40d13f747fef865857b (patch) | |
tree | 5ced78f57044fe4ca7d0caa24ad337c090b3d7ab /app/helpers | |
parent | 6a871fdcfcda72387f59f91c0fc546da90d16c75 (diff) | |
download | redmine-78d3d6c223709b1fe370a40d13f747fef865857b.tar.gz redmine-78d3d6c223709b1fe370a40d13f747fef865857b.zip |
Speed up workflow edit page rendering (#31855).
Patch by Felix Schäfer.
git-svn-id: http://svn.redmine.org/redmine/trunk@18373 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/helpers')
-rw-r--r-- | app/helpers/workflows_helper.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/helpers/workflows_helper.rb b/app/helpers/workflows_helper.rb index c09310acd..f9c545e5a 100644 --- a/app/helpers/workflows_helper.rb +++ b/app/helpers/workflows_helper.rb @@ -74,8 +74,8 @@ module WorkflowsHelper select_tag("permissions[#{status.id}][#{name}]", options_for_select(options, selected), html_options) end - def transition_tag(workflows, old_status, new_status, name) - w = workflows.select {|w| w.old_status == old_status && w.new_status == new_status}.size + def transition_tag(transition_count, old_status, new_status, name) + w = transition_count tag_name = "transitions[#{ old_status.try(:id) || 0 }][#{new_status.id}][#{name}]" if old_status == new_status |