I have found a few places that have said that they don''t mix well, but I haven''t been able to find any reasoning as to why. Does anyone have any knowledge to why this is? Thanks -- 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 -~----------~----~----~----~------~----~------~--~---
Chris Olsen wrote:> I have found a few places that have said that they don''t mix well, but I > haven''t been able to find any reasoning as to why. > > Does anyone have any knowledge to why this is?It''s not that they don''t mix well - it''s fine to use habtm with RESTful resources. It''s that you don''t get any synergy from using both of them together, since you can''t use a habtm join table record as a resource that can be addressed with a RESTful URL. But with has_many :through, a URL can describe a join model record as a resource. That means you have a noun that you can manipulate with the standard HTTP verbs. With habtm, you have to invent custom actions to manipulate the joins, so it''s not as easy or compatible. That''s all. -- Josh Susser http://blog.hasmanythrough.com -- 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 -~----------~----~----~----~------~----~------~--~---
Josh Susser wrote:> > It''s not that they don''t mix well - it''s fine to use habtm with RESTful > resources. It''s that you don''t get any synergy from using both of them > together, since you can''t use a habtm join table record as a resource > that can be addressed with a RESTful URL. But with has_many :through, a > URL can describe a join model record as a resource. That means you have > a noun that you can manipulate with the standard HTTP verbs. With habtm, > you have to invent custom actions to manipulate the joins, so it''s not > as easy or compatible. That''s all. > > -- > Josh Susser > http://blog.hasmanythrough.comThanks Josh, that makes sense. -- 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 -~----------~----~----~----~------~----~------~--~---