Skip to content

Conversation

@madhums
Copy link

@madhums madhums commented Oct 23, 2024

No description provided.

@andreibondarev
Copy link
Member

@madhums Could you please add a spec for this case?

@madhums
Copy link
Author

madhums commented Oct 29, 2024

Do you think this could be useful? On a second thought, I can expose some of the fields through model attributes without exporting the json field itself. So I am considering closing this.

when Administrate::Field::JSONB.to_s
field.to_json
else
field.to_s
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does field.to_s below produce the same output?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, I get an Administrate object.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Then this fix would make sense to me. Would this need to be included as a dependency?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately, yes.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Then I'm not sure it makes sense to do.

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

Successfully merging this pull request may close these issues.

2 participants