This isn't necessary, as `url_for({})` is equivalent to `url_for(params)`. You are removing the options only for url_for to put them back in again.

Also on a point of principle sort_link really should just stick to manipulating params[:q]

Thoughts? By the way thanks for feedback :)