Getting Started with native driver in rails

56 views
Skip to first unread message

nivocde

unread,
May 13, 2012, 9:20:33 AM5/13/12
to mongodb-user
hey,

does anyone know a cookbook example or simple github project that
shows the propper use of the native mongodb-driver in rails?

I've a working connection with the driver in rails but i like to
getting know best pratices how to use the driver, how to organize
files and so on.

The mongosite has some tutorials about mongomapper, mongoid or native
driver inplain ruby but unfotunatly nothing about native drive best
practices in rails :-(

Thanks

Tyler Brock

unread,
May 15, 2012, 8:36:03 AM5/15/12
to mongod...@googlegroups.com
We don't have one as of now but I'm working on updating the examples and will include details about using the driver inside rails as a result of this post.

Thank you for the feedback.

-Tyler

Tyler Brock

unread,
May 15, 2012, 8:41:45 AM5/15/12
to mongod...@googlegroups.com
Also to get you started, you can feel comfortable doing what seems natural in ruby/rails. For example:

Putting connection information in a yaml file with the other configs.
Creating the project using the --skip-active-record flags (or removing active record from the project if it already exists)
Instantiating db connections in an initializers.
Creating models that retrieve and store the collections.

-Tyler
Reply all
Reply to author
Forward
0 new messages