Use ruby 2.x hash syntax

This commit is contained in:
Thibault Jouan
2014-04-01 10:48:18 +00:00
parent 712e9501a2
commit da96c4814a
52 changed files with 148 additions and 148 deletions

View File

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