title: Rails associations in namespaced models
body: <p>I'm re-doing an app and migrating data from an old app. The some of the models names will be the same, though not all of them.</p>
  
  <p>I'm writing a rake task to connect to the old database, read the records, do some stuff and write the result into a new database. Because some of the table names are the same the model names will be the same, so I want to name space my models like so</p>
  
  <pre><code>module OldData
      class Account &lt;ActiveRecord::Base
        has_many :subcriptions
        establish_connection $olddb  
      end
  
      class Subscription &lt;ActiveRecord::Base
        belongs_to :account
        establish_connection $olddb  
      end
  end
  </code></pre>
  
  <p>where $olddb is a hash required to connect to the old database</p>
  
  <p>I can open account records and read them ok, but the Account model doesn't have a subscriptions association. The latest Rails documentation suggest that this should work. but it doesn't.</p>
  
  <p>Any advice?</p>