質問編集履歴

2

コードの追加

2022/04/28 10:25

投稿

mm_02
mm_02

スコア10

test CHANGED
File without changes
test CHANGED
@@ -34,6 +34,14 @@
34
34
  </div>
35
35
  ```
36
36
 
37
+ ```rb
38
+ # postコントローラーのshowアクションです
39
+ def show
40
+ @post = Post.find_by(id: params[:id])
41
+ @inputData = InputDatum.find_by(number: @post.content)
42
+ end
43
+ ```
44
+
37
45
  確認したところ
38
46
  ・posts/show.html.erbファイルの中身
39
47
  ・postコントローラーのshowアクション

1

実行したことの追記

2022/04/28 10:02

投稿

mm_02
mm_02

スコア10

test CHANGED
File without changes
test CHANGED
@@ -39,6 +39,7 @@
39
39
  ・postコントローラーのshowアクション
40
40
  ・InputDatum Load (4.0ms) SELECT "input_data".* FROM "input_data" WHERE "input_data"."number" = $1 LIMIT $2 [["number", 12345678], ["LIMIT", 1]]
41
41
  とあるように,InputDatumのデータは取れてると思います.
42
+ ・heroku run rails db:migrate は実行しました.
42
43
 
43
44
 
44
45
  解決方法がわからないため,ご教授いただければ幸いです.