Forum: Ruby on Rails params isn't cleared between requests?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
6442cbabe45924d5babe9c971f09ba18?d=identicon&s=25 Ronen Levi (Guest)
on 2006-05-19 17:01
Hi,

I just noticed that the params hash isn't being cleared between
invocations, at least in an Ajax scenario I got into, or at least
behaved very strange.

I have an observer on a checkbox which sends its value as it is changed.

First click sent value=1 and arrived into params with value=1
Second click sent value=undefined and arrived into params with value=1
(instead of undefined which was in the POST data).

If in the controller after using the params[:value] I deleted the :value
param then the POST data would arrive just fine.

Any explanation how can this be?

Thanks
This topic is locked and can not be replied to.