Topic: Model Setup Questions
I am a relatively new Rails programmer coming over from the PHP world and had a couple questions as I work on my first application.
First, suppose that I have a User model and a Calendar model. I want every Calendar to belongs_to a User, but not every User to necessarily have a Calendar. So, for that relationship, am I correct in just having a one-way belongs_to relationship with the user_id in the Calendar model and nothing in the User model? Or is there a better way to do it?
Second, when creating a User model with a Profile, is it best to have a single User model or a separate model with Profile fields (such as a bio and phone number)? When you see deployed apps, is the