I'd like to use railroad on my Rails model. Unfortunately, as I have to
make some connections to a second database I've got some models like
this:

class LegacyDb < ActiveRecord::Base
        establish_connection "legacy_db"
end

class LegacyDbData < LegacyDb
       set_table_name "data"
end

This is fine for the occasional call to the "data" table but railroad is
not at all happy:

/usr/lib64/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/connection_adapters/abstract_adapter.rb:188:in
`log': Mysql::Error: Table 'legacy_db.legacy_db_data' doesn't exist:
SHOW FIELDS FROM `legacy_db_data` (ActiveRecord::StatementInvalid)

There are a few of these models and they're used in various places so
removing them for running railroad is not really possible. Is there a
means of either preventing railroad from trying to connect to the main
application database for these models?
Thanks for any suggestions.
-- 
Posted via http://www.ruby-forum.com/.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to