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

Pass IDs rather than objects to .destroy #37461

Merged
merged 1 commit into from Oct 26, 2020
Merged

Pass IDs rather than objects to .destroy #37461

merged 1 commit into from Oct 26, 2020

Conversation

Hamms
Copy link
Contributor

@Hamms Hamms commented Oct 26, 2020

This raises an error in Rails 5.2:

You are passing an instance of ActiveRecord::Base to find. Please pass the id of the object by calling .id.

Testing story

ran relevant tests manually

Reviewer Checklist:

  • Tests provide adequate coverage
  • Privacy and Security impacts have been assessed
  • Code is well-commented
  • New features are translatable or updates will not break translations
  • Relevant documentation has been added or updated
  • User impact is well-understood and desirable
  • Pull Request is labeled appropriately
  • Follow-up work items (including potential tech debt) are tracked and linked

This raises an error in Rails 5.2:

> You are passing an instance of ActiveRecord::Base to `find`. Please pass the id of the object by calling `.id`.
@Hamms Hamms added the Rails Upgrade All work related to upgrading the version of Ruby on Rails we use. label Oct 26, 2020
@Hamms Hamms merged commit c9a5d81 into staging Oct 26, 2020
@Hamms Hamms deleted the fix-destroy-error branch October 26, 2020 23:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Rails Upgrade All work related to upgrading the version of Ruby on Rails we use.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants