I'm new to rails and wanted to know why you need to define the relationship between objects in your class (has_many etc) when it would already be defined in your database schema?
Printable View
I'm new to rails and wanted to know why you need to define the relationship between objects in your class (has_many etc) when it would already be defined in your database schema?
Defining relationships in your models tells Rails (the framework) what your relationships are so that it knows how to handle them within the app.