In database.yml file. just like development, production and test database info add another one called user_db and add information for that. Then in your user model do something like: class User < ActiveRecord::Base establish_connection :user_db ..... end Hope this should work fine. http://www.sphred.com http://nasir.wordpress.com On Jul 26, 8:15 pm, "Marcelo de Moraes Serpa" <celose...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Is there a way to configure an ActiveRecord model to use table in another > database? > > I ask this becouse our user table is a centralized one, used by many other > applications. These applications use various ways/abstratctions to > authenticate against this authentication data-source. The simples way I can > think to do this with this Rails app would be to set the User model to use > this table. > > Any way to do this? Maybe a little hack in AR through a plugin? > > Thanks in advance.--~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---