How much business logic is actually allowed in a (Rails) controller?
In the attachement I've put down three different approaches to the
Which if the three approaches is preferable?
1) Calling Payment.create! directly.
2) Calling Payment.create! from Order#add_payment wrapper.
3) Calling Payment.create! from Order#add_payment wrapper without
checking Order#payable from controller.
Am I violating any design patters with the last, and is it wise to
wrap around the Payment.create instance method in Order#add_payment?
controller_model_approaches.rb (1.29 KB)