search for: oldmodel

Displaying 1 result from an estimated 1 matches for "oldmodel".

Did you mean: oldmode
2007 Apr 04
4
joining across databases in a find statement with include (legacy db)
Hi, I have a legacy database ''old'' and a new database ''new'' which rails uses. I set up models using old with establish_connection(old), and this works well, except for include: class OldModel < ActiveRecord::Base establish_connection(old) end class NewModel < ActiveRecord::Base has_one :old_model end a = OldModel.find :first NewModel.find(:all, :include => :old_model) will give an error like Mysql::Error: Table ''new_db.old_models'' doesn''t exis...