Conversation
|
Hi. I see where you're going with this, but I think my recommended approach would be to have a single |
|
that was my first intention too. but isnt that impossible atm with the current implementation of "build_from_database" i guess at least the last feature on this page needs to be dropped http://www.couchrest.info/model/querying.html |
|
You're right. I'd forgotten about building from the database. For these fringe use-cases however, I think its acceptable if a few features don't work. To be honest, I can't think many people actually depend on this anyway, its just there really for added bit of security against fetching models of the wrong type. I've updated the master repo with a |
|
yeah you're right the use case is quite strange. it was just because a customer already had a couchdb which many other apps writing data with the type in lowercase and i really wanted to use couchrest_model and dont break anything. i already use my github version of this. i just wanted to share what i've done in case you think it's a usable solution |
needed a lowercase version for legacy reasons (preferably
everything else on the string class should also be possible.
i also think about allowing .camelcase(:lower)
let me know what you think about it.
first i thought i wanted something like directly give a name to the model. but that wont work very well with the .get on different types