We have two environments, sandbox and production, each with it''s own main database. However, production will have a separate database called Users that has login/password information, which would be used by the sandbox or production environments to login. If we set it up in our User model to use the Users database (using establish_connection) in the sandbox and production environments, is it possible to still do joins and such <through ActiveRecord, not custom sql> between the Users database and the main database that is respective to sandbox or production? -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Joins can only be used in one database AFAIK. I dont know how rails will handle it, if the connection used doing the join doesn''t have the referenced tables you will probably get an error. Kristian 2009/12/16 mrmanishs <manish-8LjrXLLD9rxF6kxbq+BtvQ@public.gmane.org>:> We have two environments, sandbox and production, each with it''s own > main database. However, production will have a separate database > called Users that has login/password information, which would be used > by the sandbox or production environments to login. > > If we set it up in our User model to use the Users database (using > establish_connection) in the sandbox and production environments, is > it possible to still do joins and such <through ActiveRecord, not > custom sql> between the Users database and the main database that is > respective to sandbox or production? > > -- > > 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en. > > >-- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
you could make use of mysql replication for the user-table --> http://dev.mysql.com/doc/refman/5.0/en/replication-options-slave.html#option_mysqld_replicate-do-table On 16 Dez., 23:27, mrmanishs <man...-8LjrXLLD9rxF6kxbq+BtvQ@public.gmane.org> wrote:> We have two environments, sandbox and production, each with it''s own > main database. However, production will have a separate database > called Users that has login/password information, which would be used > by the sandbox or production environments to login. > > If we set it up in our User model to use the Users database (using > establish_connection) in the sandbox and production environments, is > it possible to still do joins and such <through ActiveRecord, not > custom sql> between the Users database and the main database that is > respective to sandbox or production?-- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.