-
Notifications
You must be signed in to change notification settings - Fork 526
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 issue with using draper outside of controller/view context #927
fix issue with using draper outside of controller/view context #927
Conversation
I have no authority at all with Draper, so I'm sorry that I can't help with getting your PR approved. I do have one comment - I found the first line of the Description to be rather confusing. You wrote: "Replace ActionController::TestRequest with ActionController::TestRequest" |
drapergem/draper#927 Signed-off-by: Hans de Graaff <[email protected]>
I can confirm this PR fixed the problem (that popped up after upgrading to rails 6.1) in my project. In my case it was:
Thank you @timdiggins ! |
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.
👍 for dropping support of Rails 5, but could we split it from the fix?
The reason is that support for older Rails & Ruby versions is far more complicated than that of the code changed in this PR. E.g. we still have a CI for Ruby 2.4 that's incompatible with Rails 6.
9c65e88
to
b08c2d7
Compare
b08c2d7
to
ca64cc8
Compare
fixes drapergem#926 however the current PR also drops support for rails < 6.0 open to discussion around this if there's any engagement on this PR.
ca64cc8
to
6e0be67
Compare
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 a lot for your contribution 🙏
Description
Replace
ActionController::TestRequest
withActionDispatch::TestRequest
because
The current PR also drops support for rails < 6.0I think this is a good idea (especially as the tests that were dropped were written from a Rails 5.0 perspective, so are very outdated, and brittle) but open to discussion around this if there's any engagement on this PR.
Testing
See #926
To-Dos
References
fixes #926