Hi. I'm using the :overwrite_params option in link_to helper. But I have problems overwriting nested parameters values. Here some code:
With:
link_to book_item.editorial, :overwrite_params => {:filter => {[editorials.id] => book_item.editorial.id.to_s}}
The complete params[:filter]
value is replaced (ie. I lost params[:filter][:author]
value)
If I use:
link_to book_item.editorial, :overwrite_params => {'filter[editorials.id]' => book_item.editorial.id.to_s}
I don't lost values, but if params[:filter][:editorials]
exists in the url, another params[:filter][:editorials]
is attached, so I don't get any overwrite.
Any help?
Thanks in advance.