Commit 2293cb1051de5d4a0d5842ce82329bd0656673e0

Authored by Jeroen van Baarsen
Committed by Dmitriy Zaporozhets
1 parent 92ce4904

Fixed some deprecations

* Model.all is deprecacted, use without .all
* confirm: message is deprecated, needed to be wrapped
  in data block
app/contexts/issues/bulk_update_context.rb
@@ -22,7 +22,7 @@ module Issues @@ -22,7 +22,7 @@ module Issues
22 opts[:milestone_id] = milestone_id if milestone_id.present? 22 opts[:milestone_id] = milestone_id if milestone_id.present?
23 opts[:assignee_id] = assignee_id if assignee_id.present? 23 opts[:assignee_id] = assignee_id if assignee_id.present?
24 24
25 - issues = Issue.where(id: issues_ids).all 25 + issues = Issue.where(id: issues_ids)
26 issues = issues.select { |issue| can?(current_user, :modify_issue, issue) } 26 issues = issues.select { |issue| can?(current_user, :modify_issue, issue) }
27 27
28 issues.each do |issue| 28 issues.each do |issue|
app/views/projects/branches/_branch.html.haml
@@ -18,7 +18,7 @@ @@ -18,7 +18,7 @@
18 Compare 18 Compare
19 19
20 - if can?(current_user, :admin_project, @project) && branch.name != @repository.root_ref 20 - if can?(current_user, :admin_project, @project) && branch.name != @repository.root_ref
21 - = link_to project_branch_path(@project, branch.name), class: 'btn grouped btn-small remove-row', method: :delete, confirm: 'Removed branch cannot be restored. Are you sure?', remote: true do 21 + = link_to project_branch_path(@project, branch.name), class: 'btn grouped btn-small remove-row', method: :delete, data: { confirm: 'Removed branch cannot be restored. Are you sure?'}, remote: true do
22 %i.icon-trash 22 %i.icon-trash
23 23
24 %p 24 %p
app/views/projects/tags/index.html.haml
@@ -37,7 +37,7 @@ @@ -37,7 +37,7 @@
37 %i.icon-download-alt 37 %i.icon-download-alt
38 Download 38 Download
39 - if can?(current_user, :admin_project, @project) 39 - if can?(current_user, :admin_project, @project)
40 - = link_to project_tag_path(@project, tag.name), class: 'btn btn-small remove-row', method: :delete, confirm: 'Removed tag cannot be restored. Are you sure?', remote: true do 40 + = link_to project_tag_path(@project, tag.name), class: 'btn btn-small remove-row', method: :delete, data: { confirm: 'Removed tag cannot be restored. Are you sure?'}, remote: true do
41 %i.icon-trash 41 %i.icon-trash
42 42
43 = paginate @tags, theme: 'gitlab' 43 = paginate @tags, theme: 'gitlab'