Open awead opened 8 years ago
@awead is this to enable the logic on this view to move into the presenter? https://github.com/projecthydra-labs/curation_concerns/blob/c50eb158422eab073babceef3dfa0fd1f6052ab5/app/views/curation_concerns/base/_representative_media.html.erb#L1
Yes. By coincidence, we recently discussed this same idea at Penn State and came up with our own guidelines: https://github.com/psu-stewardship/etda/wiki/Model-View-Controller-Presenter
These include the idea that views should not have logic. If you let the presenter deal with the representative, you could refactor media_display so _representative_media.html.erb
can be removed and replaced it with <%= media_display(presenter) %>
.
The WorkShowPresenter knows what the representation_id is, so we could have it return a representation as well, ex.