rack - Rewrite Rails response URL -


i saw this.

i did params.select!{|k, v| v.present?} cleans blank params, not know how make response url cleaned.

i continue getting http://localhost:3000/restaurants/search?utf8=%e2%9c%93&city=&cuisine=&number_of_people=&query=hello

i looking http://localhost:3000/restaurants/search?utf8=%e2%9c%93&query=hello

also, delete utf8 param, bad?

update

i considering javascript solution, think should on server:

$('form').submit(function(e){   e.preventdefault();   // clean params, anyway hard me figure part out   $(this).submit(); }) 

my solution disable blank inputs , selects:

$('form').submit (e) ->   $(@).find('select,input').map( (i, e) -> e.disabled = !$(e).val() ) 

regarding removing utf8 found this. better keep sending it.


Comments

Popular posts from this blog

javascript - Bootstrap Popover: iOS Safari strange behaviour -

Magento/PHP - Get phones on all members in a customer group -

session - Logging Out Using PHP -