Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ActiveRecord::RecordNotFound attributes are not passed #880

Closed
sPaCeMoNk3yIam opened this issue Aug 28, 2018 · 1 comment
Closed

ActiveRecord::RecordNotFound attributes are not passed #880

sPaCeMoNk3yIam opened this issue Aug 28, 2018 · 1 comment

Comments

@sPaCeMoNk3yIam
Copy link

raise ActiveRecord::RecordNotFound, "can't find record with friendly id: #{id.inspect}"

first_by_friendly_id(id) or raise ActiveRecord::RecordNotFound, "can't find record with friendly id: #{id.inspect}"

https://api.rubyonrails.org/classes/ActiveRecord/RecordNotFound.html

FriendlyId should pass all attributes (model, primary_key, id) correctly to ensure consistent behavior for error handling. With id, of course, being the friendly_id.

@parndt
Copy link
Collaborator

parndt commented Nov 22, 2018

Fixed by #890

@parndt parndt closed this as completed Nov 22, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants