Skip to content

Allow mapping ruby object attributes to document attributes. #165

@vStone

Description

@vStone

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions