You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In my application I have a table named 'tc_data'. In the original creation of my (first) rails application I used 'rails generate scaffold tc_data field_list_here...'.
'rake db:migrate' resulted in: TABLE NAME 'tc_data', MODEL NAME TcDatum, MODEL FILE NAME tc_datum.rb.
As I hone my application toward it's beta release I rebuilt it and decided to use 'rails generate model tc_data field_list_here' since this table is used by the application but does not need web interface access.
'rake db:migrate' resulted in: TABLE NAME 'tc_data', MODEL NAME TcData, MODEL FILE NAME tc_data.rb.
I am using postgreSQL as my database engine.
It would seem that there is a code difference between 'generate scaffold' and 'generate model' in generating the table and model names.
Since this could cause a wrong convention-based reference to the table or model, I will recreate the table using 'rails generate scaffold'.