17
10

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

RailsでParamsを確認

Last updated at Posted at 2018-04-08

Post値を確認したい!といった際に。
稼働確認はRails4.1.1

####コード

controller.rb
  def create etc...
    # ①全部確認
    render plain: params.inspect
    # ②特定値のみ確認
    render plain: params[:key].inspect
  end

####出力イメージ
①全部確認の場合
※改行はされません。
スクリーンショット 2018-04-09 3.36.48.png

####参考
Railsドキュメント:params

17
10
2

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
17
10

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?