[Presenter] Create a User Decorator
Create a group decorator that helps with display logic.
See: https://ieftimov.com/decorators-and-presenters for an explanation of what a presenter is and why we need one.
-
Create a UserDecorator and add it to /presenters
-
Move display methods from the user model to the decorator
- name
- full_name
- full_name_with_intent
- pretty_intent
-
Add the UserDecorator into UsersController#show along with any other controllers that feed into views that will use these presenter methods
-
Update the StudentMailer and UserMailer to use the new decorator
-
Add all relevant testing for the logic as well.
Todo:
- find other display logic to move into the decorator
Edited by Matt Coshal