Hi Rails Guru, I am using mephisto blogging system and I need it to access "users" table of another rails app. Any idea how I can have one rails app access another rails app''s database?? Note that both rails app have table called "users". --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Mongdar wrote:> Hi Rails Guru, > > I am using mephisto blogging system and I need it to access "users" > table of another rails app. Any idea how I can have one rails app > access another rails app''s database?? Note that both rails app have > table called "users".There was something on it once http://drnicwilliams.com/2007/04/12/magic-multi-connections-a-facility-in-rails-to-talk-to-more-than-one-database-at-a-time/ -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Have you considered ActiveResource? You could use ARes to use the public API and it''d allow you to have a different model name for the other User model: class MephistoUser < ActiveResource::Base self.collection_name = ''users'' end In your homegrown app you get to use instances of MephistoUser, but each app gets to deal with it''s own ''User'' object internally. On Apr 16, 2:20 am, Roger Pack <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> Mongdar wrote: > > Hi Rails Guru, > > > I am using mephisto blogging system and I need it to access "users" > > table of another rails app. Any idea how I can have one rails app > > access another rails app''s database?? Note that both rails app have > > table called "users". > > There was something on it oncehttp://drnicwilliams.com/2007/04/12/magic-multi-connections-a-facilit... > -- > Posted viahttp://www.ruby-forum.com/.--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
that multi connection is awesome!! thanks! On Apr 16, 8:24 am, AndyV <a...-HmMyXyqgL2CVc3sceRu5cw@public.gmane.org> wrote:> Have you considered ActiveResource? You could use ARes to use the > public API and it''d allow you to have a different model name for the > other User model: > > class MephistoUser < ActiveResource::Base > self.collection_name = ''users'' > end > > In your homegrown app you get to use instances of MephistoUser, but > each app gets to deal with it''s own ''User'' object internally. > > On Apr 16, 2:20 am, Roger Pack <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> > wrote: > > > Mongdar wrote: > > > Hi Rails Guru, > > > > I am using mephisto blogging system and I need it to access "users" > > > table of another rails app. Any idea how I can have one rails app > > > access another rails app''s database?? Note that both rails app have > > > table called "users". > > > There was something on it oncehttp://drnicwilliams.com/2007/04/12/magic-multi-connections-a-facilit... > > -- > > Posted viahttp://www.ruby-forum.com/.--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
No problem. Just remember me when you''re app goes viral. :) On Apr 17, 6:20 pm, Mongdar <ryan.ch...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> that multi connection is awesome!! thanks! > > On Apr 16, 8:24 am, AndyV <a...-HmMyXyqgL2CVc3sceRu5cw@public.gmane.org> wrote: > > > Have you considered ActiveResource? You could use ARes to use the > > public API and it''d allow you to have a different model name for the > > other User model: > > > class MephistoUser < ActiveResource::Base > > self.collection_name = ''users'' > > end > > > In your homegrown app you get to use instances of MephistoUser, but > > each app gets to deal with it''s own ''User'' object internally. > > > On Apr 16, 2:20 am, Roger Pack <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> > > wrote: > > > > Mongdar wrote: > > > > Hi Rails Guru, > > > > > I am using mephisto blogging system and I need it to access "users" > > > > table of another rails app. Any idea how I can have one rails app > > > > access another rails app''s database?? Note that both rails app have > > > > table called "users". > > > > There was something on it oncehttp://drnicwilliams.com/2007/04/12/magic-multi-connections-a-facilit... > > > -- > > > Posted viahttp://www.ruby-forum.com/.--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---