Open tapajos opened 14 years ago
Interestingly, I also do not like the couchrest-type field and was thinking of ways to change it in CouchRest Model. My main reason for this is that I'm creating a couchapp which uses the same DB and having couchrest-type in all the views doesn't make much sense.
I think my preference would be to go minimal, and just use "type" as opposed to "document_type" by default. Most Rails developers are used to not using the 'type' field as it is used for STI. Anyone else can change it to something more complicated.
I do however think we should offer a migration script for people who want to change the column name.
Having closed this ticket:
http://github.com/couchrest/couchrest_extended_document/issues#issue/5
It dawned on me that allow the type to change per model as shown in the lighthouseapp ticket is a really bad idea. This has to be a global setting.
Issue from: http://github.com/couchrest/couchrest/issues#issue/25
Documents should not know about "driver" and store odd fields like couchrest-type. IIRC it was already discussed several months ago, but unfortunately I can not find a thread. The idea:
My fork http://github.com/wildchild/couchrest/commits/document_type
Related ticket: http://jchris.lighthouseapp.com/projects/17807/tickets/22-lets-use-couchrest_type
Thoughts?