Displaying 1 result from an estimated 1 matches for "home_go".
Did you mean:
home_
2006 Aug 18
1
How update a record which hasn''t id column?
...tch.new
@match.match_detail = MatchDetail.new
@match.save
OK!!!
@match = Match.find(params[:id])
@match.play <-------- THIS METHOD MODIFIY SOME VALUES OF match_detail
@match.save
Mysql::Error: Unknown column ''id'' in ''where clause'': UPDATE
match_details SET
`home_goals` = 2, `match_id` = 1, `away_goals` = 0 WHERE id = NULL
id doesn''t exist because the migration for this table specified not id
column:
create_table :match_details, :id => false do |t|
t.column :match_id, :integer, :null => false
t.column :home_goals, :integer, :d...