Merge pull request #252 from wvengen/feature-fix_redirect_with_suburi

fix root redirect when using suburi
This commit is contained in:
wvengen 2014-01-20 03:13:25 -08:00
commit 9308096e96
2 changed files with 8 additions and 1 deletions

View file

@ -31,4 +31,11 @@ class SessionsController < ApplicationController
session[:return_to] = nil
redirect_to login_url, :notice => I18n.t('sessions.logged_out')
end
# redirect to root, going to default foodcoop when none given
# this may not be so much session-related, but it must be somewhere
def redirect_to_foodcoop
redirect_to root_path
end
end

View file

@ -6,7 +6,7 @@ Foodsoft::Application.routes.draw do
get "sessions/new"
root :to => redirect("/#{FoodsoftConfig.scope}")
root :to => 'sessions#redirect_to_foodcoop'
scope '/:foodcoop' do