summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Speicher <rspeicher@gmail.com>2012-09-17 13:07:17 -0400
committerRobert Speicher <rspeicher@gmail.com>2012-09-26 16:32:21 -0400
commit339dfa32b810b8f15c26c85e692a18a0f47b9fca (patch)
tree751e35a791102567aa901eba14a0cf8eb29a6e63
parent79a02df92e18137787371468be5c8897ad2f97b0 (diff)
downloadgitlab-ce-339dfa32b810b8f15c26c85e692a18a0f47b9fca.tar.gz
Fix ref_switcher path
-rw-r--r--app/views/shared/_ref_switcher.html.haml2
-rw-r--r--app/views/tree/_head.html.haml2
-rw-r--r--app/views/tree/show.js.haml2
3 files changed, 3 insertions, 3 deletions
diff --git a/app/views/shared/_ref_switcher.html.haml b/app/views/shared/_ref_switcher.html.haml
index e0c89522c11..8b44cf1944e 100644
--- a/app/views/shared/_ref_switcher.html.haml
+++ b/app/views/shared/_ref_switcher.html.haml
@@ -1,5 +1,5 @@
= form_tag switch_project_refs_path(@project), method: :get, class: "project-refs-form" do
= select_tag "ref", grouped_options_refs, class: "project-refs-select chosen"
= hidden_field_tag :destination, destination
- - if respond_to?(:path)
+ - if defined?(path)
= hidden_field_tag :path, path
diff --git a/app/views/tree/_head.html.haml b/app/views/tree/_head.html.haml
index 5126891ebf2..c7ebbf8832d 100644
--- a/app/views/tree/_head.html.haml
+++ b/app/views/tree/_head.html.haml
@@ -1,6 +1,6 @@
%ul.nav.nav-tabs
%li
- = render partial: 'shared/ref_switcher', locals: {destination: 'tree', path: params[:path]}
+ = render partial: 'shared/ref_switcher', locals: {destination: 'tree', path: @path}
%li{class: "#{'active' if (controller.controller_name == "tree") }"}
= link_to project_tree_path(@project, @ref) do
Source
diff --git a/app/views/tree/show.js.haml b/app/views/tree/show.js.haml
index 92e90579304..3d0215ff51f 100644
--- a/app/views/tree/show.js.haml
+++ b/app/views/tree/show.js.haml
@@ -2,7 +2,7 @@
// Load Files list
$("#tree-holder").html("#{escape_javascript(render(partial: "tree", locals: {repo: @repo, commit: @commit, tree: @tree}))}");
$("#tree-content-holder").show("slide", { direction: "right" }, 150);
- $('.project-refs-form #path').val("#{params[:path]}");
+ $('.project-refs-form #path').val("#{@path}");
// Load last commit log for each file in tree
$('#tree-slider').waitForImages(function() {