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

class_attribute behavior has changed in Rails 8 #486

Open
zvkemp opened this issue Nov 12, 2024 · 3 comments
Open

class_attribute behavior has changed in Rails 8 #486

zvkemp opened this issue Nov 12, 2024 · 3 comments

Comments

@zvkemp
Copy link

zvkemp commented Nov 12, 2024

See rails/rails#53606.

This causes issues with modules not being appropriately prepended to the serializers — all of the setters re-defined in Overrides (https://github.com/graphiti-api/graphiti/blob/master/lib/graphiti/resource/configuration.rb) lose the overridden behavior.

The most salient effect for Graphiti users is probably something like:

 NoMethodError:
       undefined method `field_condition_blocks' for class Graphiti::Serializer

This is a Rails bug in my opinion, but there is probably a workaround here that doesn't involve class_attribute.

@jkeen
Copy link
Collaborator

jkeen commented Nov 12, 2024

@zvkemp Thank you for the issue! I was just thrashing around trying to fix this by taking multiple stabs without success in #485

@jkeen
Copy link
Collaborator

jkeen commented Dec 12, 2024

@zvkemp I was reading through the issues related to this in rails and see that fix got merged? You think changes need to be made in graphiti still, or just wait for the patch release of rails to get cut?

@zvkemp
Copy link
Author

zvkemp commented Dec 12, 2024

Up to you; I don't have time to devote to a fix right now. Personally I'd be fine waiting on the rails patch release

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

No branches or pull requests

2 participants