Fixed multi coop routing and changed config accessors.
This commit is contained in:
parent
2860a3ca44
commit
ec2e761e7f
28 changed files with 124 additions and 88 deletions
|
|
@ -10,6 +10,7 @@ class SessionsController < ApplicationController
|
|||
user = User.authenticate(params[:nick], params[:password])
|
||||
if user
|
||||
session[:user_id] = user.id
|
||||
session[:scope] = FoodsoftConfig.scope # Save scope in session to not allow switching between foodcoops with one account
|
||||
redirect_to session['return_to'] || root_url, :notice => "Logged in!"
|
||||
else
|
||||
flash.now.alert = "Invalid email or password"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue