Home>

I'm a beginner of Rails for about a month.

I'm using params to retrieve data after a screen transition.
Even if you look at binding.pry, there is data in params,
I can't take it out for some reason.

I know if there is no data,
It's the first time I can't take it out even though it's in it.

If i have any ideas for a solution, please let me know.

! [Contents of binding.pry] (a7528aaf14e8f74de68c6c1e2c9a045c.png)
Corresponding source code
! [view before params transfer] (01f4ffd1bcd7c9ca90ac97fe20524517.png)
What I tried Supplementary information (FW/tool version, etc.)

Rails 5.0.7.2.

  • Answer # 1

    From the image, it seems that the parameters are in multiple layers.

    params [something] [: user_id]Isn't it necessary to take it out like this?

  • Answer # 2

    Reprinted because the image is not displayed (contents of binding.pry)