From 5d785457db3017a17722314a52433543dd925164 Mon Sep 17 00:00:00 2001 From: Douwe Maan Date: Tue, 8 Sep 2015 14:49:20 +0100 Subject: Clean up overlap between dashboard and explore. - Split up SnippetsController into separate dashboard and explore sections. - Use consistent page titles, header titles and sidebars between dashboard and explore sections when signed in or not. --- app/controllers/projects_controller.rb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'app/controllers/projects_controller.rb') diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb index dafc11d0707..540bfa9ac07 100644 --- a/app/controllers/projects_controller.rb +++ b/app/controllers/projects_controller.rb @@ -10,6 +10,10 @@ class ProjectsController < ApplicationController layout :determine_layout + def index + redirect_to (current_user ? root_path : explore_root_path) + end + def new @project = Project.new end -- cgit v1.2.1 From 1489d225d6763b0fdc3f418692e646587e06938a Mon Sep 17 00:00:00 2001 From: Douwe Maan Date: Tue, 8 Sep 2015 15:14:14 +0100 Subject: Move partial to right place and fix tests. --- app/controllers/projects_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/controllers/projects_controller.rb') diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb index 540bfa9ac07..0bbaa93b0df 100644 --- a/app/controllers/projects_controller.rb +++ b/app/controllers/projects_controller.rb @@ -11,7 +11,7 @@ class ProjectsController < ApplicationController layout :determine_layout def index - redirect_to (current_user ? root_path : explore_root_path) + redirect_to(current_user ? root_path : explore_root_path) end def new -- cgit v1.2.1 From f87f6480b2ff6a80b50aa275f9c5d60c30d75b40 Mon Sep 17 00:00:00 2001 From: Douwe Maan Date: Tue, 8 Sep 2015 17:14:02 +0100 Subject: Use new routing helper --- app/controllers/projects_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/controllers/projects_controller.rb') diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb index 0bbaa93b0df..f4d1a828aab 100644 --- a/app/controllers/projects_controller.rb +++ b/app/controllers/projects_controller.rb @@ -109,7 +109,7 @@ class ProjectsController < ApplicationController if request.referer.include?('/admin') redirect_to admin_namespaces_projects_path else - redirect_to dashboard_path + redirect_to dashboard_projects_path end rescue Projects::DestroyService::DestroyError => ex redirect_to edit_project_path(@project), alert: ex.message -- cgit v1.2.1