HG
2008-Jan-08 10:40 UTC
How can I detect from the controller which database adaptor is in use?
I''m using Postgres in development and MySQL in production. They use different SQL syntax in some places in my code. How can I detect from the controller which adaptor is in use? I''ll be migrating the production site to Postgres, so switching to MySQL in development isn''t an option. Thanks, Jose --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
HG
2008-Jan-08 10:48 UTC
Re: How can I detect from the controller which database adaptor is in use?
On Jan 8, 2:40 am, HG <j...-oNoWckAxTcaFhjwBz98joA@public.gmane.org> wrote:> I''m using Postgres in development and MySQL in production. They use > different SQL syntax in some places in my code. > > How can I detect from the controller which adaptor is in use?Got it. Model#connection.adapter_name --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---