On Nov 4, 12:38 am, Nick Hoffman <
n...@deadorange.com> wrote:
> Hi Eldon. I tried your suggestion, but was unable to get it to work:
https://gist.github.com/662139
>
> Would you mind posting an example of how you setup a relationship
> between a Mongoid::Document class and an ActiveRecord::Base class,
> please?
>
> Thanks!
> Nick
I got Eldon's suggestion working. I must've fat-fingered something
yesterday. Now, I'm able to do this:
m = MongoidModel.last
ar = ActiveRecordModel.last
m.active_record_model = ar
m.save
When I tried this next:
ar.mongoid_model
this error occured:
undefined method `quoted_table_name' for MongoidModel:Class
Adding this to the MongoidModel class fixed the error above:
self.quoted_table_name
'"mongoid_model"'
end
Unfortunately, this error is occuring now, and I'm stumped:
ruby-1.9.2-p0 > ar.mongoid_model
(Object doesn't support #inspect)
=>
Any idea how to solve that one?