Rails Unable to convert unpermitted parameters to hash

前端 未结 5 1610
感动是毒
感动是毒 2020-12-14 06:03

I am trying to implement a simple search and sort for my webapp. I am following the railscast and this railscast.

My application helper for sortable function which

5条回答
  •  既然无缘
    2020-12-14 06:37

    You can use this hack:

    params.to_enum.to_h
    

    I think rails developers will restrict it when they know it's the way to use unpermitted parameters. :)

提交回复
热议问题