I have a TripDecorator which decorates a Trip object. A Trip has many Activities.
I'd like to create a TripDecorator method that generates a list of activities belonging to a specific Trip.
How can I convert this:
<h5>Activities</h5>
<ul>
<% @trip.activities.each do |activity| %>
<%= content_tag :li, activity.name %>
<% end %>
</ul>
to this:
<%= @trip.activities_list %>
I'd like nothing to appear if no activities exist. Is this abstraction possible with Draper?