link_to with changing one single get-param


i want to sort some of my data-tables with an application-helper named

in this helper i want to define a link with following schema,
depending on params[:direction]:
link_to fieldname, request.url + '?order=desc' (or asc)

but this link isn't correct if I click on it several times:


Can somebody give me a hint?


found it by myself:

link_to 'linkname', params.merge({ ‘sort’ => column, ‘order’ =>
order })