Fix coding standards in application

This commit is contained in:
Thibault Jouan
2014-04-01 19:02:23 +00:00
parent aca19eb51f
commit e6f6475705
5 changed files with 54 additions and 44 deletions

View File

@@ -1,14 +1,16 @@
class API::SessionsController < API::ApplicationController
skip_before_filter :authenticate!, only: [:create]
module API
class SessionsController < ApplicationController
skip_before_filter :authenticate!, only: [:create]
def create
user = User.find_by_email(params[:session][:email])
def create
user = User.find_by_email(params[:session][:email])
if !user.try(:authenticate?, params[:session][:password])
return render json: '', status: :not_found
unless user.try(:authenticate?, params[:session][:password])
return render json: '', status: :not_found
end
@user = user
self.current_user = @user
end
@user = user
self.current_user = @user
end
end