From: Dr Nic Date: 2006-08-16T18:30:45+09:00 Subject: Re: Dr Nic’s Magic Models Xavier Noria wrote: > On Aug 16, 2006, at 8:38 AM, Dr Nic wrote: > >> This might just be sacrifice of using the MMs. I'm not sure there's a >> way to know to create just a HABTM when you might need a has_many >> :through; the latter being more general and powerful. The triggering >> logic would be the same. > > Couldn't you just create a habtm if there are no columns in the > intermediate tale but the ones with the keys? Does MM support has_one > BTW? It generates a has_one if your method name is singular. E.g. @person.membership - has_one @person.memberships - has_many So much magic in one place! :) -- Posted via http://www.ruby-forum.com/.