Merge pull request #252 from wvengen/feature-fix_redirect_with_suburi
fix root redirect when using suburi
This commit is contained in:
commit
9308096e96
2 changed files with 8 additions and 1 deletions
|
@ -31,4 +31,11 @@ class SessionsController < ApplicationController
|
||||||
session[:return_to] = nil
|
session[:return_to] = nil
|
||||||
redirect_to login_url, :notice => I18n.t('sessions.logged_out')
|
redirect_to login_url, :notice => I18n.t('sessions.logged_out')
|
||||||
end
|
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
|
end
|
||||||
|
|
|
@ -6,7 +6,7 @@ Foodsoft::Application.routes.draw do
|
||||||
|
|
||||||
get "sessions/new"
|
get "sessions/new"
|
||||||
|
|
||||||
root :to => redirect("/#{FoodsoftConfig.scope}")
|
root :to => 'sessions#redirect_to_foodcoop'
|
||||||
|
|
||||||
|
|
||||||
scope '/:foodcoop' do
|
scope '/:foodcoop' do
|
||||||
|
|
Loading…
Reference in a new issue