Hi,
I have a 2 tables project and task. The task table has a foreign key on
projects. Whenever, I create a new task through my view, I see my added
task and a new project_id, but my project table keeps on having
duplicate rows for the project, as long as I keep on submitting tasks
for the same project. I thougth that Rails would handle this by itself?
Any idea? Suggestions?
I have a 2 tables project and task. The task table has a foreign key on
projects. Whenever, I create a new task through my view, I see my added
task and a new project_id, but my project table keeps on having
duplicate rows for the project, as long as I keep on submitting tasks
for the same project. I thougth that Rails would handle this by itself?
Any idea? Suggestions?
maybe you need to search the database to see if there's an existing
project entry already and update that one rather than creating one
from scratch each time?