-
Notifications
You must be signed in to change notification settings - Fork 257
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
Use a custom YAML coder to restore backwards-compatible deserialization of serialized query parameters #2770
Conversation
764cbbd
to
2050d9d
Compare
c6f1c3e
to
b0c7286
Compare
b0c7286
to
efb1264
Compare
The Rails 6.1 failure is surprising - I just checked the Rails patch files and it looks like the config is exposed on |
ae493cd
to
abc2084
Compare
Anything that would make it hard to backport to BL 7.x too? |
@@ -3,7 +3,7 @@ | |||
class Search < ApplicationRecord | |||
belongs_to :user, optional: true | |||
|
|||
serialize :query_params | |||
serialize :query_params, Blacklight::SearchParamsYamlCoder |
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.
Maybe a comment explaining why this is necessary, and that it becomes no longer necessary if in a Rails version including rails/rails#45591
(If that rails gets merged, as it looks like it will, then at some future point where BL only supports Rails versions where the latest patch includes that rails change, this custom coder will no longer be necessary)
Or the comment could be down with the custom coder class itself, maybe.
abc2084
to
d2c4519
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.
Suggested one explanatory comment, otherwise I think this is good while Rails sorts itself out
Co-authored-by: Benjamin Armintor <[email protected]>
Fixes #2768