summaryrefslogtreecommitdiff
path: root/users/app/controllers/sessions_controller.rb
diff options
context:
space:
mode:
authorAzul <azul@leap.se>2012-10-30 15:36:16 +0100
committerAzul <azul@leap.se>2012-10-30 15:36:16 +0100
commitf2825d10e6447ea766fee085841e2b92b0477976 (patch)
tree6f5d9774d62634ae2ff1610a9960f814387ebdb1 /users/app/controllers/sessions_controller.rb
parentbcc0f11caeef1b09712b9b62e1607237885d1af5 (diff)
sending proper error messages from warden.
still need to translate these
Diffstat (limited to 'users/app/controllers/sessions_controller.rb')
-rw-r--r--users/app/controllers/sessions_controller.rb7
1 files changed, 5 insertions, 2 deletions
diff --git a/users/app/controllers/sessions_controller.rb b/users/app/controllers/sessions_controller.rb
index 7b7799c..06d55eb 100644
--- a/users/app/controllers/sessions_controller.rb
+++ b/users/app/controllers/sessions_controller.rb
@@ -3,14 +3,17 @@ class SessionsController < ApplicationController
skip_before_filter :verify_authenticity_token
def new
+ if warden.winning_strategy
+ @errors = warden.winning_strategy.message
+ end
end
def create
- env['warden'].authenticate!
+ authenticate!
end
def update
- env['warden'].authenticate!
+ authenticate!
end
def destroy