Thanks again for the information, What we are trying
to do is to create a runtime generic
ActiveRecord::base. One aspect that we like to have is
able to change/read/write a database whenever it is
necessary. Actually, when you want to connect to a
database. you have to know where it is, which table
you want to read/write. so you have to predefine your
database connection in database.yml and predefine the
table-model class with ActiveRecord::Base.
So what we are trying to do, is to create in runtime a
generic class that will allow us to connect to a not
predifine database and tables. We have really sucess
to create a generic runtime class, we are able to
change/read/write tables within the same database.
However when we try to change the using database. We
are not able to this within the same action. We are
able to change database in two actions, but within the
same action, We don’t know why Rails keep giving us
back the old database adapter, even we have “clean up”
everything we “know”.
We suppect there is a “cache” of objects somewhere, in
Ruby interpreter or in Rails. Instead of return the
new adapter, it picks up the one for some unknown
reason… we are still experimenting…
Do you have any idea?
Thanks you very much once again:)!!!
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around