summaryrefslogtreecommitdiff
path: root/app/controllers/graph_controller.rb
diff options
context:
space:
mode:
authorSato Hiroyuki <sathiroyuki@gmail.com>2013-04-14 12:09:47 +0000
committerSato Hiroyuki <sathiroyuki@gmail.com>2013-05-13 18:44:33 +0900
commitc0e3b39792cb7ad479af66c07685eb37e654ccb6 (patch)
treec574680995d385213205c63e8f8e6fb44e38b574 /app/controllers/graph_controller.rb
parent97a9c2293affaeeba6f448b8760bb5dffd170f2c (diff)
downloadgitlab-ce-c0e3b39792cb7ad479af66c07685eb37e654ccb6.tar.gz
Set @options in assing_ref_vars
@options enable to keep params when switching ref.
Diffstat (limited to 'app/controllers/graph_controller.rb')
-rw-r--r--app/controllers/graph_controller.rb10
1 files changed, 2 insertions, 8 deletions
diff --git a/app/controllers/graph_controller.rb b/app/controllers/graph_controller.rb
index b4bf9565112..22544ad82aa 100644
--- a/app/controllers/graph_controller.rb
+++ b/app/controllers/graph_controller.rb
@@ -8,14 +8,8 @@ class GraphController < ProjectResourceController
before_filter :require_non_empty_project
def show
- if params.has_key?(:q)
- if params[:q].blank?
- redirect_to project_graph_path(@project, params[:id])
- return
- end
-
- @q = params[:q]
- @commit = @project.repository.commit(@q) || @commit
+ if @options[:q]
+ @commit = @project.repository.commit(@options[:q]) || @commit
end
respond_to do |format|