Sean Cribbs wrote:
> Typically I'd do something like this inside the player editing form (in
> Haml):
> 
> - Sport.all.each do |sport|
>   = check_box_tag 'player[sport_ids][]', sport.id,
> player.sports.include?(sport), :id => "player_sport_ids_#{sport.id}"
>   %label{:for => "player_sport_ids_#{sport.id}"}= sport.name
> 
> 
> Sean

Okay, got all of this figured out and everything looks good in the 
views.

I had to create a players_sports table with player_id and sport_id 
columns and set has_and_belongs_to_many on player.rb model

The only problem is, it isn't saving to the database on submit. Any tips 
for making it work?

If I make an update method in player_controller, (which inherits 
abstractmodelcontroller), do i also have to make new, edit, remove, etc?
-- 
Posted via http://www.ruby-forum.com/.
_______________________________________________
Radiant mailing list
Post:   Radiant@radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant

Reply via email to