Skip to content
Browse files

Merge pull request #13780 from rohitpaulk/patch-1

Updated association_basics.md
  • Loading branch information...
2 parents 8c7e8b4 + 464d47e commit f484df79f26bca7e952f907878074eddbf72656d @rafaelfranca rafaelfranca committed
Showing with 13 additions and 0 deletions.
  1. +13 −0 guides/source/association_basics.md
View
13 guides/source/association_basics.md
@@ -490,6 +490,19 @@ end
With this setup, you can retrieve `@employee.subordinates` and `@employee.manager`.
+In your migrations/schema, you will add a references column to the model itself.
+
+```ruby
+class CreateEmployees < ActiveRecord::Migration
+ def change
+ create_table :employees do |t|
+ t.references :manager
+ t.timestamps
+ end
+ end
+end
+```
+
Tips, Tricks, and Warnings
--------------------------

0 comments on commit f484df7

Please sign in to comment.
Something went wrong with that request. Please try again.