This has got to be something obvious that I am missing…
I have a remote form that has one value that is passed back to the
server from a text field. The form has a set of parameters passed to the
:url key called search_params. When the field is empty and the form is
submitted, I get
:my_val => “”
as expected when I examine the log. All is well with the world.
I need call that same action from a link_to_remote, in this case forcing
my_val to be empty (""). To do this, I do
search_params.merge(:my_val => “”)
Examining the search_params hash after the merge, I see that my_val is
“” (not nil). When the params arrive at the server, the log shows
:my_val => nil. Due to some other code downstream, nil causes operations
to fail (it really needs to be “”, not nil).
What am I missing here?
TIA,
Keith