Skip to content

Commit

Permalink
Fix example code in README.md
Browse files Browse the repository at this point in the history
When `User.find` doesn't find any record,
it raises `ActiveRecord::RecordNotFound`.
  • Loading branch information
tricknotes committed Oct 23, 2013
1 parent 8131d36 commit 21b854f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ You need to configure Doorkeeper in order to provide resource_owner model and au
``` ruby
Doorkeeper.configure do
resource_owner_authenticator do
User.find(session[:current_user_id]) || redirect_to(login_url)
User.find_by_id(session[:current_user_id]) || redirect_to(login_url)
end
end
```
Expand Down

0 comments on commit 21b854f

Please sign in to comment.