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

Allow mapping ruby object attributes to document attributes. #165

Open
vStone opened this issue Nov 1, 2024 · 0 comments
Open

Allow mapping ruby object attributes to document attributes. #165

vStone opened this issue Nov 1, 2024 · 0 comments

Comments

@vStone
Copy link

vStone commented Nov 1, 2024

I'm trying to use couch_potato for an existing schema (where I have no say in the contents).
It contains some interesting keys such as 'with-a-dash' or 'why_no_question?'

This obviously fails when mapping this on ruby attributes.
Perhaps it could be useful to allow:
field :my_field, couchdb_key: 'my-field'

ChatGPT helped me (poorly) to make some adjustments and get this to work. I have not tested this extensively.

If you want, I can PR my changes but you will probably have a better view on where to make these adjustments to support this.

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

1 participant