So with a lot of banging head on the head I was finally able to write some code that I need like this:
= link_to 'Clear', params.merge(:teachers => {:sort_column => 'teacher_name', :sort_direction => 'desc'}), :class => 'btn'
Notice I have used params.merge command.
But now I ran it through the Brakeman gem and it says params.merge has a cross site scripting vulnerability.
So now how can I rewrite the same code that doesn't use params.merge?