In my database the id for a field is 810. RoR thinks that it is 809.
My log file (below) shows that just before the insert it grabs the next
sequence value. I dont think it should do that. This causes problems
further down the line when trying to access the Person object.
Development Log file :
"SQL (0.016000) select people_seq.nextval id from dual
Person Create (0.015000) INSERT INTO people (title, weight,
mothers_maiden_name, shoe_size, middlename, person_type, username,
firstname, height, person_id, createdby, expired, name_string, surname)
VALUES(‘Mr’, ‘100’, ‘’, 10, ‘T’, null, null, ‘T’, ‘’, :id, ‘Chris
Richards’, 0, null, ‘T’)"
My Code (standard generated code):
@person = Person.new(params[:person])
flash[:notice] = ‘Person was successfully created.’
Its wierd, ive used rails for weeks with no problems.