Is it possible to populate a join table in a HABTM relationship via nested forms (accepts attributes

High level, if I have the following two models with a join table, is it
possible to create a nested form which would populate the join table. In
this case, I would have a form for Roster with multiple nested forms for
players_rosters (the join table). From what I see in playing with this
and
online is that it is not possible, and probably is a design issue, maybe
better to make player_rosters a model that way I could get at it
directly
(and more easily on my nested form). Any feedback?

create_table “rosters”, :force => true do |t|
t.string “name”
t.integer “fantasy_matchup_id”
end

create_table “players”, :force => true do |t|
t.string “first_name”
t.string “last_name”
end

create_table “players_rosters”, :id => false, :force => true do |t|
t.integer “player_id”
t.integer “roster_id”
end

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs