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

回答編集履歴

1

URL

2020/07/24 16:25

投稿

unhappychoice
unhappychoice

スコア1531

answer CHANGED
@@ -1,10 +1,10 @@
1
- Ref: https://railsguides.jp/action_controller_overview.html#ルーティングパラメータ
1
+ Ref: [https://railsguides.jp/action_controller_overview.html#ルーティングパラメータ](https://railsguides.jp/action_controller_overview.html#ルーティングパラメータ)
2
2
 
3
3
  > paramsハッシュに必ず含まれるキーは:controllerキーと:actionキーです。ただしこれらの値には直接アクセスせず、controller_nameとaction_nameという専用のメソッドを使ってください。
4
4
 
5
5
  関係ないかもしれませんが、 `params[:controller]` ではなく `controller_name` を利用するように推奨されています
6
6
 
7
- Ref: https://railsguides.jp/layouts_and_rendering.html#レイアウトの探索順序
7
+ Ref: [https://railsguides.jp/layouts_and_rendering.html#レイアウトの探索順序](https://railsguides.jp/layouts_and_rendering.html#レイアウトの探索順序)
8
8
 
9
9
  ```
10
10
  class ProductsController < ApplicationController