mongodb - How would one 'build' embedded documents in mongoid? -


trying create embedded documents collection. however, finding approach bit inefficient , long-coming. there better way like:

@stat.dates.find_or_create_by(date: 20130904).users.find_or_create_by(status: 'signed_in').update_attributes(count: 1234) 

i aware there autobuild directive. applies embeds_one , has_one associations.

any other approaches?


Comments

Popular posts from this blog

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

html - How to style widget with post count different than without post count -

url rewriting - How to redirect a http POST with urlrewritefilter -