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

rails ActiveModel::Attributes support #85

Open
james-caresnap opened this issue Oct 15, 2021 · 1 comment · May be fixed by #119
Open

rails ActiveModel::Attributes support #85

james-caresnap opened this issue Oct 15, 2021 · 1 comment · May be fixed by #119
Labels
enhancement New feature or request

Comments

@james-caresnap
Copy link

I have some rails models with custom Postgres jsonb attributes which are serialized/deserialized using the Attributes API. In other words, they are POROs with the following mixins:

  • ActiveModel::Model
  • ActiveModel::Attributes
  • ActiveModel::Serialization

It looks like amazing_print just dumps these by calling inspect on them. What's the right way to add support to amazing print for these types? Add something to amazing_print/lib/amazing_print/ext/? Or modify the ActiveRecord extension? It looks like maybe you could just add another switch case here?

@HarlemSquirrel
Copy link
Member

Hey @james-caresnap sorry for the super delayed response but this sounds like a great idea! Sounds like ActiveRecord extension should be fine for this. I welcome a pull request!

@HarlemSquirrel HarlemSquirrel added the enhancement New feature or request label Nov 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants