diff --git a/app/controllers/concerns/authentication/current_user_manager.rb b/app/controllers/concerns/authentication/current_user_manager.rb index 3ee754578..7f05c7375 100644 --- a/app/controllers/concerns/authentication/current_user_manager.rb +++ b/app/controllers/concerns/authentication/current_user_manager.rb @@ -44,7 +44,7 @@ def set_current_user def require_login unless @current_user - # check if we are redirected from the case page, and if so lets support unfurling + # check if we are redirected from the case page, and if so support unfurling # by populating the flash so it renders in the start.html.erb layout. if 'core' == params[:controller] && 'index' == params[:action] && params[:id] flash[:unfurl] = Case.find_by(id: params[:id]) diff --git a/app/controllers/core_controller.rb b/app/controllers/core_controller.rb index 57f26f624..367436f85 100755 --- a/app/controllers/core_controller.rb +++ b/app/controllers/core_controller.rb @@ -8,6 +8,11 @@ class CoreController < ApplicationController def index end + # We want to distingush between a /case url and a /teams for unfurling logic. + def teams + render 'index' + end + def new @case = current_user.cases.build case_name: "Case #{current_user.cases.size}" @case.save! diff --git a/config/routes.rb b/config/routes.rb index 14820e492..773c5a32a 100755 --- a/config/routes.rb +++ b/config/routes.rb @@ -200,7 +200,7 @@ get '/cases' => 'core#index' get '/case' => 'core#index' get '/cases/import' => 'core#index' - get '/teams(/:id)' => 'core#index', as: :teams + get '/teams(/:id)' => 'core#teams', as: :teams get '/scorers' => 'core#index' # Static pages