mardi 23 mai 2017

Need a single rails model with dynamic collection name

I have rails model and I am using mongo mapper as ORM. I have two collections with similar attributes and single model. I need to dynamically set collection name in the model based on some condition (user permission) so How I can set dynamically collection name for the model?

Aucun commentaire:

Enregistrer un commentaire