Topic: Creating a table for a join model
I am trying to create a join model and it's table.
I want to use the migration:
create table favorites do |t|
My question is: what object does it "t.belongs_to"? Does it belong to the table name, the model name or the model file name?
My table was originally named tc_employee. When I created it in Rails, Rails forced a table name change to tc_employees. Within tc_employee.rb the model is named TcEmployee.
From the Rails documentation I can't tell if the belongs_to in the create table migration refers to the table name, the model name or the name of the model .rb file.
Any help greatfully appreciated. -Fred
Last edited by fredrated (2013-07-16 16:05:02)