Commit 1048917232992671b0a01f4c87ed00edfff633e8
1 parent
99d39133
Exists in
master
and in
4 other branches
Update usages of project_commit[s] route helpers
Showing
8 changed files
with
9 additions
and
9 deletions
Show diff stats
app/controllers/refs_controller.rb
... | ... | @@ -19,7 +19,7 @@ class RefsController < ApplicationController |
19 | 19 | new_path = if params[:destination] == "tree" |
20 | 20 | project_tree_path(@project, @ref) |
21 | 21 | else |
22 | - project_commits_path(@project, ref: @ref) | |
22 | + project_commits_path(@project, @ref) | |
23 | 23 | end |
24 | 24 | |
25 | 25 | redirect_to new_path | ... | ... |
app/decorators/event_decorator.rb
... | ... | @@ -21,7 +21,7 @@ class EventDecorator < ApplicationDecorator |
21 | 21 | elsif self.merge_request? |
22 | 22 | h.project_merge_request_url(self.project, self.merge_request) |
23 | 23 | elsif self.push? |
24 | - h.project_commits_url(self.project, ref: self.ref_name) | |
24 | + h.project_commits_url(self.project, self.ref_name) | |
25 | 25 | end |
26 | 26 | end |
27 | 27 | end | ... | ... |
app/decorators/tree_decorator.rb
app/views/commits/_commit_box.html.haml
... | ... | @@ -5,7 +5,7 @@ |
5 | 5 | %span.btn.disabled.grouped |
6 | 6 | %i.icon-comment |
7 | 7 | = @notes_count |
8 | - = link_to patch_project_commit_path(@project, @commit.id), class: "btn small grouped" do | |
8 | + = link_to project_commit_path(@project, @commit, format: :patch), class: "btn small grouped" do | |
9 | 9 | %i.icon-download-alt |
10 | 10 | Get Patch |
11 | 11 | = link_to project_tree_path(@project, @commit), class: "browse-button primary grouped" do | ... | ... |
app/views/commits/_diffs.html.haml
... | ... | @@ -5,7 +5,7 @@ |
5 | 5 | %p To prevent performance issue we rejected diff information. |
6 | 6 | %p |
7 | 7 | But if you still want to see diff |
8 | - = link_to "click this link", project_commit_path(@project, @commit.id, force_show_diff: true), class: "dark" | |
8 | + = link_to "click this link", project_commit_path(@project, @commit, force_show_diff: true), class: "dark" | |
9 | 9 | |
10 | 10 | %p.cgray |
11 | 11 | Showing #{pluralize(diffs.count, "changed file")} | ... | ... |
app/views/layouts/_head.html.haml
... | ... | @@ -10,8 +10,8 @@ |
10 | 10 | - if controller_name == 'projects' && action_name == 'index' |
11 | 11 | = auto_discovery_link_tag :atom, projects_url(:atom, private_token: current_user.private_token), title: "Dashboard feed" |
12 | 12 | - if @project && !@project.new_record? |
13 | - - if current_page?(project_tree_path(@project, @project.root_ref)) || current_page?(project_commits_path(@project)) | |
14 | - = auto_discovery_link_tag(:atom, project_commits_url(@project, :atom, ref: @ref, private_token: current_user.private_token), title: "Recent commits to #{@project.name}:#{@ref}") | |
13 | + - if current_page?(project_tree_path(@project, @ref)) || current_page?(project_commits_path(@project, @ref)) | |
14 | + = auto_discovery_link_tag(:atom, project_commits_url(@project, @ref, format: :atom, private_token: current_user.private_token), title: "Recent commits to #{@project.name}:#{@ref}") | |
15 | 15 | - if request.path == project_issues_path(@project) |
16 | 16 | = auto_discovery_link_tag(:atom, project_issues_url(@project, :atom, private_token: current_user.private_token), title: "#{@project.name} issues") |
17 | 17 | = csrf_meta_tags | ... | ... |
app/views/layouts/_project_menu.html.haml
... | ... | @@ -8,7 +8,7 @@ |
8 | 8 | = link_to project_tree_path(@project, @project.root_ref) do |
9 | 9 | Files |
10 | 10 | %li{class: commit_tab_class} |
11 | - = link_to "Commits", project_history_path(@project, @project.root_ref) | |
11 | + = link_to "Commits", project_commits_path(@project, @project.root_ref) | |
12 | 12 | |
13 | 13 | %li{class: tab_class(:network)} |
14 | 14 | = link_to "Network", graph_project_path(@project) | ... | ... |
features/steps/shared/paths.rb