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

Add strict loading for active storage #40623

Merged
merged 1 commit into from
Nov 16, 2020
Merged

Add strict loading for active storage #40623

merged 1 commit into from
Nov 16, 2020

Conversation

dcangulo
Copy link
Contributor

@dcangulo dcangulo commented Nov 15, 2020

Summary

Closes #40621
Adds strict_loading to ActiveStorage model.

Other Information

has_one_attached :logo, strict_loading: true
has_many_attached :images, strict_loading: true

Copy link
Contributor

@tahsin352 tahsin352 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

build fails??

@eugeneius
Copy link
Member

That flaky test was just fixed in 65d7aa5, if you rebase it will pass in CI.

This change looks reasonable, but it needs API documentation and tests.

@dcangulo
Copy link
Contributor Author

@eugeneius Rebased, added tests, and documentation.

Copy link
Member

@eileencodes eileencodes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I left a comment about docs, otherwise this looks good.

activestorage/lib/active_storage/attached/model.rb Outdated Show resolved Hide resolved
activestorage/lib/active_storage/attached/model.rb Outdated Show resolved Hide resolved
@dcangulo
Copy link
Contributor Author

@eileencodes Docs has been updated. Please check. Thanks.

@eileencodes eileencodes merged commit 66c9b7b into rails:master Nov 16, 2020
rafaelfranca pushed a commit that referenced this pull request Nov 16, 2020
…ments

Add strict loading for active storage
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6.1.0.rc1 Strict loading assocations doesn't work with ActiveStorage
4 participants