aboutsummaryrefslogtreecommitdiffstats
path: root/guides
diff options
context:
space:
mode:
authornao0515ki <ishigaki0515naoki@gmail.com>2018-04-14 22:28:01 +0900
committernao0515ki <ishigaki0515naoki@gmail.com>2018-04-14 22:28:01 +0900
commit8300268441a7cc53d3a274a0d542d16e18bf8771 (patch)
tree4a7e2f594e9c56b73638f742b15576fe43b3883c /guides
parent662ba236d115d3e2152b04dcdefdc0ee6f1f6102 (diff)
downloadrails-8300268441a7cc53d3a274a0d542d16e18bf8771.tar.gz
rails-8300268441a7cc53d3a274a0d542d16e18bf8771.tar.bz2
rails-8300268441a7cc53d3a274a0d542d16e18bf8771.zip
[ci skip] belongs_to in self join association needs optional: true, if it's over 5.0 ver of rails
Diffstat (limited to 'guides')
-rw-r--r--guides/source/association_basics.md2
1 files changed, 1 insertions, 1 deletions
diff --git a/guides/source/association_basics.md b/guides/source/association_basics.md
index 860a1e1cba..6fbd52edbd 100644
--- a/guides/source/association_basics.md
+++ b/guides/source/association_basics.md
@@ -505,7 +505,7 @@ class Employee < ApplicationRecord
has_many :subordinates, class_name: "Employee",
foreign_key: "manager_id"
- belongs_to :manager, class_name: "Employee"
+ belongs_to :manager, class_name: "Employee", optional: true
end
```