Fixed multi coop routing and changed config accessors.

This commit is contained in:
benni 2012-08-24 19:52:38 +02:00
parent 2860a3ca44
commit ec2e761e7f
28 changed files with 124 additions and 88 deletions

View file

@ -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"