Just out of curiosity, is there any advantage (other than not needing
to declare the model) to a habtm over a has_many :through?

Last I heard there wasn't and habtm was not being developed because of
this.  IANA rails developer though, hence the question.

On Aug 16, 11:23 am, Matt Jones <[email protected]> wrote:
> On Mon, Aug 16, 2010 at 1:10 PM, Matt Jones <[email protected]> wrote:
> > On Mon, Aug 16, 2010 at 12:21 PM, voobles <[email protected]> wrote:
> >> indeed it works the way you described it Matt! Thanks.
>
> >> just to clarify, what i tried, was to use habtm with :index,
> >> ie.
> >> has_and_belongs_to_many :model_name, :index => 'some_field_name'
>
> > Ah, got it. There's not support for naming an index on the habtm
> > model; actually, it looks like HabtmModelShim (in
> > migration_generator.rb) explicitly declares *no* indexes, so the
> > generator might even try to drop existing ones.
>
> Meh. Just after I wrote that, I noticed that the change_indexes
> routine basically gives up (the first line) when presented with a join
> table shim. So, you can add the indexes manually in the migration (hit
> 'g' instead of 'm' to generate the migration without running it) and
> add the indexes manually for now.
>
> --Matt Jones

-- 
You received this message because you are subscribed to the Google Groups "Hobo 
Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/hobousers?hl=en.

Reply via email to