do not require authentication for root redirect
This commit is contained in:
parent
ecb2f2a015
commit
151f851799
3 changed files with 8 additions and 6 deletions
|
@ -62,9 +62,4 @@ class HomeController < ApplicationController
|
||||||
redirect_to my_profile_path
|
redirect_to my_profile_path
|
||||||
end
|
end
|
||||||
|
|
||||||
# redirect to root, going to default foodcoop when none given
|
|
||||||
def redirect_to_foodcoop
|
|
||||||
redirect_to root_path
|
|
||||||
end
|
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
|
@ -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 => 'home#redirect_to_foodcoop'
|
root :to => 'sessions#redirect_to_foodcoop'
|
||||||
|
|
||||||
|
|
||||||
scope '/:foodcoop' do
|
scope '/:foodcoop' do
|
||||||
|
|
Loading…
Reference in a new issue