I have a pretty standard authenticate method
private
def authenticate_user
@current_user = User.find_by_authentication_token(params[:token])
unless @current_user
error = { :error => "Invalid token." }
respond_with(error, :status => 401 )
end
end
I am calling the API to ensure the authenticate fails.
I get an error stating
ArgumentError (Nil location provided. Can't build URI.):
app/controllers/api/v1/base_controller.rb:13:in `authenticate_user'
What am I doing wrong?
base_controller.rb
? Which line is line 13? – Teryn