mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
- Fixed typo in the example of a self join on a model
This commit is contained in:
parent
fda9c7d0c8
commit
e0fdbfd33a
1 changed files with 1 additions and 1 deletions
|
@ -342,7 +342,7 @@ In designing a data model, you will sometimes find a model that should have a re
|
||||||
|
|
||||||
<ruby>
|
<ruby>
|
||||||
class Employee < ActiveRecord::Base
|
class Employee < ActiveRecord::Base
|
||||||
has_many :subordinates, :class_name => "Employee"
|
has_many :subordinates, :class_name => "Employee",
|
||||||
belongs_to :manager, :class_name => "Employee"
|
belongs_to :manager, :class_name => "Employee"
|
||||||
:foreign_key => "manager_id"
|
:foreign_key => "manager_id"
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue