Displaying 1 result from an estimated 1 matches for "create_lines".
Did you mean:
create_files
2006 Apr 06
3
Inserting parent_id
...- lines
lines has a foreign key constraint to projects.id
When I''m creating a new line object, the database fails on insert with
the following error:
"PGError: ERROR: null value in column "project_id" violates not-null
constraint"
My code looks like this:
def create_lines
@project = params[:id]
@line = Line.new(params[:line])
if @line.save
flash[:notice] = ''Lines was successfully created.''
redirect_to :action => ''list''
else
render :action => ''new''
end
end
Here'...