質問編集履歴
2
/app/controllers/last_prices_controller.rbの内容追記
test
CHANGED
File without changes
|
test
CHANGED
@@ -80,6 +80,36 @@
|
|
80
80
|
|
81
81
|
```
|
82
82
|
|
83
|
+
/app/controllers/last_prices_controller.rb
|
84
|
+
|
85
|
+
```
|
86
|
+
|
87
|
+
class LastPricesController < ApplicationController
|
88
|
+
|
89
|
+
|
90
|
+
|
91
|
+
def index
|
92
|
+
|
93
|
+
end
|
94
|
+
|
95
|
+
|
96
|
+
|
97
|
+
def create
|
98
|
+
|
99
|
+
@btcpr = LastPrice.new(id: 1, pair_code: 1, pair_name: "Bitcoin-JPY")
|
100
|
+
|
101
|
+
@btcpr.save
|
102
|
+
|
103
|
+
redirect_to("/last_prices")
|
104
|
+
|
105
|
+
end
|
106
|
+
|
107
|
+
|
108
|
+
|
109
|
+
end
|
110
|
+
|
111
|
+
```
|
112
|
+
|
83
113
|
|
84
114
|
|
85
115
|
### 試したこと
|
1
タイトル変更
test
CHANGED
@@ -1 +1 @@
|
|
1
|
-
クラスメソッドのエラーが出てしまう
|
1
|
+
Railsアプリ内に自作ファイルを入れて実行しようとするとクラスメソッドのエラーが出てしまう
|
test
CHANGED
File without changes
|