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

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Ronen Levi (Guest)
on 2006-05-19 19:01

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?

This topic is locked and can not be replied to.