0

I have a form_tag declaration:

<%= form_tag(:action => :index) do %>

It was working fine until I upgraded to Rails 4. Now all the params from this form continue to stay in the address bar, and forcing their value on all future invocations of this form.

I have managed to workaround for now by adding the following code to the controller after consuming these params:

arr = %i(prev_bal as_of amtpaid pmt_date apr authenticity_token commit int_day new_curbal utf8)
arr.each { |sym| params[sym] = nil }

I would appreciate a cleaner way to resolve this.

Thanks for taking the time to help.

UPDATE

The pagination links created by kaminari are the only ones with the params in the url. The only param those links should have is ?page=.

Anil
  • 3,899
  • 1
  • 20
  • 28
  • Add view and controller, please. – Serabe Aug 14 '13 at 01:12
  • Suspect related to turbolinks. – sevenseacat Aug 14 '13 at 01:13
  • @sevenseacat That was a good suspect. But the problem persists even after I removed turbolinks from Gemfile. That does however makes me think of kaminari. Now I notice that it is only happening on the page links, and I had to move from will_paginate to kaminari. – Anil Aug 14 '13 at 11:55

0 Answers0