Re: Re: HABTM Duplicates?


Not too much going on in the code (I don’t think). Several select boxes
the character view, which look somewhat like this:

<% regular_skills =
SkillCategory.find(:first, :conditions => “name = ‘Regular’”).skills %>

<%= options_from_collection_for_select(regular_skills, 'id', 'name') %>

Which is all being saved with the normal create
method in the characters_controller (no extra code there from me).

look into your has_many :through suggestion also. Thanks for looking.


— removed_email_address@domain.invalid wrote:

Is there perhaps an option
to have Rails write duplicates into the

or am I looking
at the whole model incorrectly? Any advice would be


That should work. Hard to say why it’s not without seeing your code. But

another approach would be to use a has_many :through association with
count attribute in the join model. Then you wouldn’t need to worry about

counting multiple rows in the join table.

Josh S.

Posted via

Rails mailing list