Hi. I have a model that connects to a database, does something, connects
to a different database, does something, and so on.
The switching of the databases appears to work, as calling:
MyModel.connection.instance_eval { @config[:database] }
Yields the correct database.
After changing databases I also call:
set_table_name('new_table_name')
However, upon issuing a query:
User.find(:all)
I receive an error similar to:
Unknown column 'old_table_name.column' in 'where clause'...
Any ideas?
--
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
-~----------~----~----~----~------~----~------~--~---