Hello guys,
I'm using the establish connection method on my models to connect to
different databases. My question is : Is it possible to connect to
various databases dynamically as I'm trying to do (I am sending a name
param) or does the connection params are only loaded once and can't be
changed?
ActiveRecord::Base.establish_connection(
:adapter => "sqlite",
:database => "db_#{name}"
)
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---