From b574170de4bfa5addea5fed2082801f4bd081792 Mon Sep 17 00:00:00 2001 From: Erik Michaels-Ober Date: Sun, 3 Apr 2011 06:56:51 -0700 Subject: [PATCH] Fix bug --- app/controllers/sessions_controller.rb | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/app/controllers/sessions_controller.rb b/app/controllers/sessions_controller.rb index 74e5a04..02d1a50 100644 --- a/app/controllers/sessions_controller.rb +++ b/app/controllers/sessions_controller.rb @@ -1,11 +1,9 @@ class SessionsController < Devise::SessionsController - respond_to :json - def create resource = warden.authenticate(:scope => resource_name) if resource sign_in(resource_name, resource) - respond_with resource + render(:json => resource) else render(:json => {"errors" => {:password => ["You need to sign in or sign up before continuing."]}}) end