WIP: PoC of using a presenter for the `projects#show` view
What does this MR do?
This is an example how presenters could be done and used in views to prevent views from directly accessing models' internals.
Notes:
- no helpers in decorators
- only data and logic in the presenter
- explicit delegation is used in this PoC, the upside is that the presenter is not clutered with many unused methods; the downside is that views needs to be able to accept a presenter instance, meaning that the presenter must explicitely delegate all the methods the view is expecting from it. This approach is kind of "dangerous" because views are all over the place, and it's hard to know when a view is given a model or a presenter... We might want to use
SimpleDelegator
in some cases to ensure we don't getundefined method
errors, for instance for theprojects#show
view shown here.
Related to #23563 (closed).