質問編集履歴
1
seedファイルのソースコードを追加しました。
test
CHANGED
File without changes
|
test
CHANGED
@@ -90,6 +90,44 @@
|
|
90
90
|
|
91
91
|
```
|
92
92
|
|
93
|
+
`db/seecs.rb`
|
94
|
+
|
95
|
+
```
|
96
|
+
|
97
|
+
# 見頃
|
98
|
+
|
99
|
+
12.times do |n|
|
100
|
+
|
101
|
+
Season.create!(
|
102
|
+
|
103
|
+
month_name: "#{n+1}月" )
|
104
|
+
|
105
|
+
end
|
106
|
+
|
107
|
+
|
108
|
+
|
109
|
+
# 場所
|
110
|
+
|
111
|
+
Area.create!(name: "北海道")
|
112
|
+
|
113
|
+
Area.create!(name: "東北")
|
114
|
+
|
115
|
+
Area.create!(name: "関東")
|
116
|
+
|
117
|
+
Area.create!(name: "中部")
|
118
|
+
|
119
|
+
Area.create!(name: "関西")
|
120
|
+
|
121
|
+
Area.create!(name: "四国")
|
122
|
+
|
123
|
+
Area.create!(name: "中国")
|
124
|
+
|
125
|
+
Area.create!(name: "九州")
|
126
|
+
|
127
|
+
Area.create!(name: "沖縄")
|
128
|
+
|
129
|
+
```
|
130
|
+
|
93
131
|
`app/models/area.rb`
|
94
132
|
|
95
133
|
```
|