SitePoint Sponsor |
|
User Tag List
Results 1 to 2 of 2
Thread: Defining relationships
-
Feb 15, 2009, 00:28 #1
- Join Date
- Jul 2006
- Posts
- 26
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Defining relationships
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?
-
Feb 15, 2009, 07:15 #2
- Join Date
- Feb 2003
- Location
- Akron, OH, USA
- Posts
- 106
- Mentioned
- 3 Post(s)
- Tagged
- 0 Thread(s)
Defining relationships in your models tells Rails (the framework) what your relationships are so that it knows how to handle them within the app.
Bookmarks