回答編集履歴
2
追加
test
CHANGED
@@ -1,3 +1,5 @@
|
|
1
1
|
```each``` でループを回した際に、```near_stations``` には、 ```stations``` の最後の要素が入っています。
|
2
2
|
|
3
3
|
```near_stations = ``` を ```near_stations << ``` に変更してみてはどうですか?
|
4
|
+
|
5
|
+
もしくは、シンプルに、 ```near_stations = Station.all``` でも良いのではないかと思います。
|
1
修正
test
CHANGED
@@ -1,3 +1,3 @@
|
|
1
1
|
```each``` でループを回した際に、```near_stations``` には、 ```stations``` の最後の要素が入っています。
|
2
2
|
|
3
|
-
```near_stations = ``` を ```near_stations << ```
|
3
|
+
```near_stations = ``` を ```near_stations << ``` に変更してみてはどうですか?
|