-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Support chages to show_helper
in Rails 7
#2741
base: main
Are you sure you want to change the base?
Conversation
show_helper
to add the type
argumentshow_helper
in Rails 7
Do you think it’s possible to add a failing example? |
Not unless there's an easy way of providing a different template to a spec test. Ideally I'd add a test template that called Also, if anyone has any preferences on how to address the rubocop failure, I'll make a change. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👋 thanks for looking at this, can you provide a spec for this and see how we usually prefer to define these kind of conditionals.
If the refactoring doesn't take care of the rubocop warning then add a disable to the class.
I've updated the change to remove the override for Rails 6 (and have reverted I'm still struggling to see a good way of setting up a spec test; but as I'm now not changing the function, just removing it from Rails 7, then the existing Rails 7 tests should show that it still works? The default templates do call |
The first argument is overridden by default in `rspec-rails`
#2492 overrode
show_helper
, which in Rails 6 looks like:But Rails 7 changed it to
This change supports the arguments in Rails 7 while maintaining support for Rails 6.