Couldn't find Type without an ID

Also looking further at your model,I suggest you make some other modifications:

if you have the columns "created_at" and "updated_at" then Rails will automitically update them with the relevant datetime (or created_on/ updated_on for date columns). So I suggest you change your modified_date and created_on column names.

Rails is a world where following convention gets you great productivity gains, and not following convention can cause pain and anguish - as I am learning very fast.

Cheers, --Kip