LoginSignup
0
0

More than 3 years have passed since last update.

[Rails] cloud9でのパラメータ確認方法

Posted at

結論

コントローラーのPOSTに"raise"という文字を組み込む

  def create
    @voice = Voice.new
    @voice.user = current_user
    @voice.voice = params[:voice][:voice]

    raise

    if @voice.save
      redirect_to @voice, notice: 'Voice was successfully created.'
    else
      render :new
    end
  end


すると

params.png

parameters以下に値が入っていれば表示される。

0
0
0

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
0
0