Jochen Kaechelin
2008-Jan-02 04:18 UTC
polymorphic assosciations - still the way in Rails 2.0.x
I store a lot of information concerning blogs, events, books, bla bla... So I have a lot of database tables including the same fields: url, user_id, subject, comment..... So I decided to use polymorphic assosciations. Is this still the prefered way in 2.0.x or does Rails 2.0.x offers me a easier, faster and more preferable way to do this? By the way, isn''t it much easier to do all the search stuff with only one table? Perhaps it would not be so fast, but easier?! Thanx --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Ryan Bigg
2008-Jan-02 04:25 UTC
Re: polymorphic assosciations - still the way in Rails 2.0.x
I dont think that Rails 2.0 has any new ways to do this. What did you mean by the searching? -- Ryan Bigg http://www.frozenplague.net Feel free to add me to MSN and/or GTalk as this email. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Jochen Kaechelin
2008-Jan-02 04:29 UTC
Re: polymorphic assosciations - still the way in Rails 2.0.x
> What did you mean by the searching?Let''s say a visitor wants to search the whole webseite for "activerecord". Then I have to query all tables (blogs, books, forums) ... and the showing the results. When all these things are stored in only ONE table things a much easier to handle. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Ryan Bigg
2008-Jan-02 04:46 UTC
Re: polymorphic assosciations - still the way in Rails 2.0.x
Storing them all into one table sounds complicated, but I understand what you''re trying to achieve. I don''t think that it''s possible to put all that information into the one table without over complicating things. Have you heard of acts_as_ferret? That''s pretty good for searing. On Jan 2, 2008 2:59 PM, Jochen Kaechelin <gissmoh-Vg5pTm5GbeLoK6nBLMlh1Q@public.gmane.org> wrote:> > > > What did you mean by the searching? > > Let''s say a visitor wants to search the whole webseite for > "activerecord". Then I have to query all tables (blogs, books, > forums) ... and the showing the results. When all these things are > stored in only ONE table things a much easier to handle. > > > > > >-- Ryan Bigg http://www.frozenplague.net Feel free to add me to MSN and/or GTalk as this email. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Jochen Kaechelin
2008-Jan-02 05:01 UTC
Re: polymorphic assosciations - still the way in Rails 2.0.x
On 2 Jan., 05:46, "Ryan Bigg" <radarliste...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Storing them all into one table sounds complicated, but I understand what > you''re trying to achieve.:-)> I don''t think that it''s possible to put all that information into the one > table without over complicating things. > Have you heard of acts_as_ferret? That''s pretty good for searing.Yes, I heard of it but never used it. I will give it a try. Thanx --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Mark Wilden
2008-Jan-02 07:11 UTC
Re: polymorphic assosciations - still the way in Rails 2.0.x
On Jan 1, 8:18 pm, Jochen Kaechelin <giss...-Vg5pTm5GbeLoK6nBLMlh1Q@public.gmane.org> wrote:> I store a lot of information concerning blogs, events, books, bla > bla... > > So I have a lot of database tables including the same fields: url, > user_id, subject, comment.....Three letters: D, R, and Y. :) I would definitely factor that data out into its own model. Your searches will be faster, since you''ll be querying one table instead of X many tables. ///ark --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---