[Radiant] Can extensions use a different database?

Oliver Baltzer oliver.baltzer at nobits.com
Tue Mar 27 14:14:56 CDT 2007


Hi Colin:

Colin Nederkoorn wrote:
> Where I am uncertain is - Can you query a different database from an
> extension? If so, how?

I don't think Rails currently has support for connecting to two
databases simultaneously. However, if you are familiar with SQL you can
always setup a second database connection in your extension and then
"manually" query the second database with a database interface other
than ActiveRecord, e.g. DBI. Of course you won't have the luxurious
ActiveRecord wrappers, but you may even be able to bend those to work
with a second connection.

Cheers,
Oliver



More information about the Radiant mailing list