What are good solutions for tagging in Rails with MongoID?
It seems that it is really simple to just add a hash or array to a document, but I am not sure if that is the best approach.
Maybe some Gem? Or a simple trick with nested documents?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
For now, I used a very simple approach, that works very well: Just include an
Array-field.This works, but I am a still a little doubtfull about the performance of the Image.any_in map/reduce. I think there may be a better solution for that map/reduce but have not found it, yet.