Commit 2293cb10 authored by Jeroen van Baarsen's avatar Jeroen van Baarsen Committed by Dmitriy Zaporozhets

Fixed some deprecations

* Model.all is deprecacted, use without .all
* confirm: message is deprecated, needed to be wrapped
  in data block
parent 92ce4904
...@@ -22,7 +22,7 @@ module Issues ...@@ -22,7 +22,7 @@ module Issues
opts[:milestone_id] = milestone_id if milestone_id.present? opts[:milestone_id] = milestone_id if milestone_id.present?
opts[:assignee_id] = assignee_id if assignee_id.present? opts[:assignee_id] = assignee_id if assignee_id.present?
issues = Issue.where(id: issues_ids).all issues = Issue.where(id: issues_ids)
issues = issues.select { |issue| can?(current_user, :modify_issue, issue) } issues = issues.select { |issue| can?(current_user, :modify_issue, issue) }
issues.each do |issue| issues.each do |issue|
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
Compare Compare
- if can?(current_user, :admin_project, @project) && branch.name != @repository.root_ref - if can?(current_user, :admin_project, @project) && branch.name != @repository.root_ref
= 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 = 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
%i.icon-trash %i.icon-trash
%p %p
......
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
%i.icon-download-alt %i.icon-download-alt
Download Download
- if can?(current_user, :admin_project, @project) - if can?(current_user, :admin_project, @project)
= 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 = 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
%i.icon-trash %i.icon-trash
= paginate @tags, theme: 'gitlab' = paginate @tags, theme: 'gitlab'
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment