← Back to Upcase

CRUD, Validations, and Partials

(Upcase ) #1

© 2012 - 2017 thoughtbot, inc. Upcase, the design of a robot, and thoughtbot are registered trademarks of thoughtbot, inc.

This is a companion discussion topic for the original entry at https://thoughtbot.com/upcase/videos/intermediate-rails-2

(Arman Jon Villalobos) #2

The instructor mention that there are other ways for the sorting the shouts but did not enumerate the options he was talking about. Was I thinking maybe the other option is sorting in the controller? Would love to know the other options as well.

(Andrew Rodrigues) #3

You can sort in the controller, but from my understanding, it’s not best practice to do so. I believe it’s better to having sorting methods within your model, then use them in your controller whenever necessary.

(Oktober Comstock) #4

Here’s a good reference on WHY it’s usually not such a good idea to use default scopes for the curious.