I'm working on a picture gallery web application. It has many access routes, they all should render a gallery the same way, the only difference is the order of the pictures.
so for example:
mysite.com/favorites -> shows all the pics ordered by number of favorites
mysite.com/views -> shows all the pics ordered by number of views
mysite.com/date -> shows all the pics ordered by date
mysite.com/votes -> shows all the pics ordered by votes
Being all these actions so similar between them, Is it a good practice to define one action per route on the controller and pass the order as parameter? Or this logic should be handled in the model?