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

[v3.2] Only default to activestorage adapter if Rails version is supported #4564

Merged
merged 1 commit into from
Sep 5, 2022

Conversation

tvdeyen
Copy link
Member

@tvdeyen tvdeyen commented Sep 5, 2022

Same as #4563 but for v3.2

@tvdeyen tvdeyen force-pushed the v3.2-active-storage-rails-6.1 branch 2 times, most recently from 191f377 to 5e9e48e Compare September 5, 2022 10:02
We only support the activestorage adapter with Rails 6.1 and above,
but we default to it, even if the Rails version is 6.0 and below.
Since we still support Rails 5.2 and 6.0, we cannot default to
the active storage adapter. The app won't boot unless we also
change the adapter in the spree initializer.

If the initializer, though, is nested in a `config.to_prepare` hook
(as recommended from Rails new autoloader zeitwerk [1]) the app
refuses to start anyhow, because the config is then taken from
the `app_configuration` defaults.

[1](https://guides.rubyonrails.org/autoloading_and_reloading_constants.html#use-case-1-during-boot-load-reloadable-code)
@tvdeyen tvdeyen force-pushed the v3.2-active-storage-rails-6.1 branch from 5e9e48e to a5a7b50 Compare September 5, 2022 10:32
@tvdeyen tvdeyen merged commit 4aff0d0 into solidusio:v3.2 Sep 5, 2022
@tvdeyen tvdeyen deleted the v3.2-active-storage-rails-6.1 branch September 5, 2022 16:11
@waiting-for-dev waiting-for-dev added the type:bug Error, flaw or fault label Sep 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:bug Error, flaw or fault
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants