I want the default sorting to be rating DESC, but I also have, some ajax sorting.
Here is my controller:
def konkurrance_oversigt
@konkurrencerb = Konkurrancer.order(sort_column + "" + sort_direction)
@titel = 'Gratis konkurrenceoversigt | Vinderhimlen.dk'
end
How should I set the default order, without removeing the ajax sorting?
1 Answer