Ruby on Rails: Five tips for cleaner controller code
Austin Startup
APRIL 8, 2018
For handling requests, move the business logic out of controllers and into plain old Ruby objects like Service objects (app/services) or models (app/models) that don’t inherit from ActiveRecord, and call that in your controller to handle the business logic. Rule of thumb: your controller actions should be no more than 5–7 lines of code.
Let's personalize your content