Rails Unable to convert unpermitted parameters to hash

前端 未结 5 1606
感动是毒
感动是毒 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:25

    you can try to use request.parameters.merge, below is sample for your code above

    <%= link_to title, listings_path(request.parameters.merge({:sort => "column", :direction => "direction", :page => nil})), :class => "form-control css_class" %>  
    

提交回复
热议问题