ActionView::Helpers::UrlHelper
link_to_unless_current
API ドキュメント(Rails 8.1.4.1) ↗def link_to_unless_current(name, options = {}, html_options = {}, &block)
説明
渡した URL が今のページでなければ <a> を作り、今のページなら中身の文字列だけを返します。
描画するときの今のリクエストは、ERB の欄の上にある
GET /articles?page=2 です(このサイトで決めたもの)。ERB
直前との違い: 追加 削除 変更
今のリクエスト
GET /articles?page=2
HTML
プレビュー
フォーム送信
フォームデータ
| name | value |
|---|
リクエストボディを見る
Content-Type:
params