Here’s my very small, basic test website use case I’m building:
A 'Posting' belongs to a 'User' and a 'User' can have many 'Posting's.
I know that in the database there has to be a foreign key relationship. Do I need to specify this foreign key in the generator?
rails generate Posting name:string body:text post_date:date User:User???
Thank you for your suggestions.
By the way, if your field type is string, you don’t actually need to specify it’s type – rails will set it to string by default.