diff --git a/app/controllers/home_controller.rb b/app/controllers/home_controller.rb index 99f108ce..b44f114d 100644 --- a/app/controllers/home_controller.rb +++ b/app/controllers/home_controller.rb @@ -62,4 +62,9 @@ class HomeController < ApplicationController redirect_to my_profile_path end + # redirect to root, going to default foodcoop when none given + def redirect_to_foodcoop + redirect_to root_path + end + end diff --git a/config/routes.rb b/config/routes.rb index 3fc54a65..31c2d52f 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -6,7 +6,7 @@ Foodsoft::Application.routes.draw do get "sessions/new" - root :to => redirect("/#{FoodsoftConfig.scope}") + root :to => 'home#redirect_to_foodcoop' scope '/:foodcoop' do