On 12/19/05, Raphael Bauduin
<rblists-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
wrote:> Hi,
>
> I''m writing a translation plugin which takes the translations from
a
> database that is different than the application''s main database.
> When in my plugin''s models I put this code:
>
> ActiveRecord::Base.establish_connection(
> RAILS_ENV+"-translations"
> )
>
> all my application''s models use the plugin''s database....
> Why are my application''s models not using the default database?
The
> plugin models are not related to the application''s models.
solution, use this code in the model:
establish_connection(
RAILS_ENV+"-translations"
)
sorry for the noise :|
Raph
>
> Thanks.
>
> Raph
>