I am unsure how to handle the following in terms of the “Rails way”:
The design requirement: A user may create a “goal” for themselves or (if
they have sufficient permissions) they may create a goal for somebody
Once the user has filled in the form and clicked “submit”, I am unsure
where I should put the logic to check that the User may create the goal?
Do I put the logic in the controller that processes the form data?
Or, must it go into the Goal model ?
Ordinarily, I would have put that in the controller, but most of my
reading suggests that all business logic should reside in the model.
Any guidance would be appreciated.