1
0
mirror of https://github.com/meineerde/redmine.git synced 2025-12-20 15:31:12 +00:00

code layout clean up app/controllers/issues_controller.rb

git-svn-id: http://svn.redmine.org/redmine/trunk@18718 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Toshi MARUYAMA 2019-10-17 16:39:31 +00:00
parent 7a44f38c2c
commit f891a28152

View File

@ -284,7 +284,9 @@ class IssuesController < ApplicationController
if @copy if @copy
@attachments_present = @issues.detect {|i| i.attachments.any?}.present? @attachments_present = @issues.detect {|i| i.attachments.any?}.present?
@subtasks_present = @issues.detect {|i| !i.leaf?}.present? @subtasks_present = @issues.detect {|i| !i.leaf?}.present?
@watchers_present = User.current.allowed_to?(:add_issue_watchers, @projects) && Watcher.where(:watchable_type => 'Issue', :watchable_id => @issues.map(&:id)).exists? @watchers_present = User.current.allowed_to?(:add_issue_watchers, @projects) &&
Watcher.where(:watchable_type => 'Issue',
:watchable_id => @issues.map(&:id)).exists?
end end
@safe_attributes = edited_issues.map(&:safe_attribute_names).reduce(:&) @safe_attributes = edited_issues.map(&:safe_attribute_names).reduce(:&)