couch_potato icon indicating copy to clipboard operation
couch_potato copied to clipboard

Allow mapping ruby object attributes to document attributes.

Open vStone opened this issue 1 year ago • 0 comments

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.

vStone avatar Nov 01 '24 13:11 vStone