The topic of Rails code structure and the attendant ability to write tests always winds up in a mixture of things everyone should try once, things I do regularly, things I wish I could do regularly, things I don’t do but generally regret not doing, and so on.
In that spirit, a few recommendations:
My current practice is to move complex transaction logic out of controllers into action objects, complex creation logic out of models and into factory objects, and view logic into presenters—all of those are plain, non-Rails Ruby objects. David Heinemeier Hansson thinks all of these lead to overly complicated code. That has not been my experience. You should try for yourself.
I like to use SimpleDelegator to create ...