質問するログイン新規登録

質問編集履歴

2

誤字のしxy痛性

2019/04/16 09:11

投稿

yfj
yfj

スコア12

title CHANGED
File without changes
body CHANGED
@@ -53,8 +53,8 @@
53
53
  create_table "products", options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4", force: :cascade do |t|
54
54
  ~(省略)~
55
55
  t.integer "indentify_route", default: 0
56
- t.index ["province_id"], name: "index_identifications_on_province_id"
56
+ t.index ["province_id"], name: "index_products_on_province_id"
57
- t.index ["user_id"], name: "index_identifications_on_user_id"
57
+ t.index ["user_id"], name: "index_products_on_user_id"
58
58
  end
59
59
  ```
60
60
 
@@ -72,7 +72,7 @@
72
72
 
73
73
  下記のエラーが出ます。
74
74
  ```
75
- ActiveModel::UnknownAttributeError: unknown attribute 'indentify_route' for Identification.
75
+ ActiveModel::UnknownAttributeError: unknown attribute 'indentify_route' for Product.
76
76
  ```
77
77
 
78
78
  なので、activeModelがidentify_routeというカラム?スキーマ情報?を認知してないように思います。

1

誤字を修正

2019/04/16 09:11

投稿

yfj
yfj

スコア12

title CHANGED
File without changes
body CHANGED
@@ -17,7 +17,7 @@
17
17
  ```ruby
18
18
  ~(省略)~
19
19
  before do
20
- create(:identification, user: user, indentify_route: :admin_identify, review_status: :in_progress)
20
+ create(:product, user: user, indentify_route: :admin_identify, review_status: :in_progress)
21
21
  end
22
22
 
23
23
  it '商品が新規で作られない' do