Skip to content

Commit

Permalink
Return nil instead of error on find_by_auth_token
Browse files Browse the repository at this point in the history
  • Loading branch information
leesmith committed Feb 23, 2013
1 parent 2048638 commit ec765b7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/controllers/application_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ class ApplicationController < ActionController::Base
private

def authenticated_user
@authenticated_user ||= User.find_by_auth_token!(cookies[:auth_token]) if cookies[:auth_token]
@authenticated_user ||= User.find_by_auth_token(cookies[:auth_token]) if cookies[:auth_token]
end

def require_authentication
Expand Down

0 comments on commit ec765b7

Please sign in to comment.