質問編集履歴

1

コードを追記

2022/07/04 00:44

投稿

pecchan
pecchan

スコア555

test CHANGED
File without changes
test CHANGED
@@ -20,3 +20,26 @@
20
20
  分かる方教えていただけると幸いです。
21
21
  宜しくお願い致します。
22
22
 
23
+ ### ご指摘によりコード追記
24
+ すみません。肝心のコードが抜けておりました・・・。
25
+ 以下に追記致します。
26
+ ```ruby
27
+ /app/controllers/provider/listings/build_controller.rb
28
+
29
+ def create_payment_configurations
30
+ unless @listing.payment_configuration.present?
31
+ # ↓の「create_payment_configuration」上で「定義へ移動」をしてみた
32
+ @listing.create_payment_configuration!(is_card: true, is_bank: true, is_convenience: true,
33
+ bank_limit_days: Payment::BankPayment::ORDER_LIMIT_DAYS
34
+ )
35
+ end
36
+ end
37
+ ```
38
+
39
+ 上記で飛ばないので、@listing上で「定義へ移動」すると、そちらはジャンプしました。
40
+ ```ruby
41
+ def listing
42
+ @listing ||= Listing.find_by(id: params[:listing_id])
43
+ end
44
+ ```
45
+