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

Fix deprecated use of config.action_mailer.preview_path = in favor of ...preview_paths << to support Rails 7.1 upgrade #2705

Closed
wants to merge 2 commits into from

Conversation

alexevanczuk
Copy link

@alexevanczuk alexevanczuk commented Oct 21, 2023

Fixes #2703

Also see rails/rails#31595, particularly this comment

…of `...preview_paths <<` to support Rails 7.1 upgrade
@JonRowe
Copy link
Member

JonRowe commented Oct 21, 2023

Thanks, I'm actually working on this myself at the moment as its not quite this simple, we need to support both methods and also fix that check

@alexevanczuk
Copy link
Author

Gotcha @JonRowe. Do you know where I can find what versions of Rails that rspec-rails currently supports? I wonder if we could just check rails version and use the new api if the version is greater than or equal to the version of rails that introduced the api. What do ya think?

@pirj
Copy link
Member

pirj commented Oct 22, 2023

use rspec-rails 6.x for Rails 6.1 or 7.x.

check rails version

Or like this

if respond_to?(:fixture_paths=)

@JonRowe
Copy link
Member

JonRowe commented Oct 22, 2023

We support the same matrix as Rails, so 6.1, 7.0 and 7.1

@JonRowe
Copy link
Member

JonRowe commented Oct 23, 2023

Closing in favour of #2706

@JonRowe JonRowe closed this Oct 23, 2023
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

Successfully merging this pull request may close these issues.

Rails 7.1 upgrade: using deprecated preview_path=
3 participants