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

undefined method `sports' for #<Player:

(Sorry, I'm new to rails! )

I would need to add has_and_belongs_to_many :sports to Player.rb model, 
right?
-- 
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