top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

using mongodb with ActiveRecord or other in Ruby on Rails

+1 vote
399 views

We recently looked at mongoDB a bit. I was discussing using mongoDB with active record but was told that maybe there are other or better options. Can someone comment on that ?

Also, someone suggested storing a ruby array directly inside of a record where I would have opted for the array to be a separate set of records in active record using has_many and belongs_to .. It seemed to me that how I search on those child records would be a big factor but I soon realized I need to find out what are the options. Do people store arrays and hashes directly in mongo DB fields or is that not the best way to go ?

posted Oct 17, 2013 by Deepak Dasgupta

Looking for an answer?  Promote on:
Facebook Share Button Twitter Share Button LinkedIn Share Button

Similar Questions
+2 votes

I'd like to continue with Rails but I wonder how to switch from SQLite3 to MongoDB.

+5 votes

I want to make just simple back End to my first Ruby application, so I want to make header and include it to all of the pages in this back end

So how I can make require or include to simple Html page in ruby (this page just I want to set some links in it)

in Php we just make page and require or include it by
require("my_page_name.php")
or
include("my_page_name.php")

How we can make that in Ruby on Rails.

+3 votes

In the following code -

 require 'active_record'

 class Order < ActiveRecord::Base
 end

 order = Order.find(1)
 ...

As per http://api.rubyonrails.org/ find() is an instance public method. So why can we call Order.find(1) here? Shouldn't it be Order.new.find(1)?

...