search for: relate_to_team

Displaying 1 result from an estimated 1 matches for "relate_to_team".

2006 Jul 18
1
Saving an ActiveRecord object
...ate_player'' #{RAILS_ROOT}/app/controllers/team_controller.rb:53:in `add_player'' And my Player model is: class Player < ActiveRecord::Base belongs_to :team # Crea un jugador con los valores por defecto def Player.create_player(team_id) player = Player.new player.relate_to_team(team_id) player.save <-------------------------------- LINE 17 return player end # Relaciona el jugador con un equipo def relate_to_team(team_id) @team_id = team_id end end What means that error? Do Player class hasn''t a save method? -- Posted via http://www....