Sha256: 3ab70a558b00d0f7e162edcccc4f740f53d62dce6751c8335ce977497ef7bdfb

Contents?: true

Size: 599 Bytes

Versions: 26

Compression:

Stored size: 599 Bytes

Contents

<h3><%= @event.name %> Attendees</h3>
<% @event.participants.group_by(&:class).map do |type, participants| %>
  <h4><%= link_to(pluralize(participants.size, type.to_s), engine_path(type)) %></h4>
  <ol>
  <% participants.each do |participant| %>
    <% name_attr = participant.attribute_names.detect{|m_attr| m_attr =~ /name/} %>
    <% if participant.respond_to?(:name) %>
    <li><%= link_to(participant.send(name_attr), engine_path(participant)) %></li>
    <% elsif name_attr %>
    <li><%= link_to(participant.name, engine_path(participant)) %></li>
    <% end %>
  <% end %>
  </ol>
<% end %>

Version data entries

26 entries across 26 versions & 1 rubygems

Version Path
event_calendar_engine-0.2.15 app/views/attendees/index.html.erb
event_calendar_engine-0.2.14 app/views/attendees/index.html.erb
event_calendar_engine-0.2.13 app/views/attendees/index.html.erb
event_calendar_engine-0.2.11 app/views/attendees/index.html.erb
event_calendar_engine-0.2.10 app/views/attendees/index.html.erb
event_calendar_engine-0.2.8 app/views/attendees/index.html.erb
event_calendar_engine-0.2.7 app/views/attendees/index.html.erb
event_calendar_engine-0.2.6 app/views/attendees/index.html.erb
event_calendar_engine-0.2.5 app/views/attendees/index.html.erb
event_calendar_engine-0.2.4 app/views/attendees/index.html.erb
event_calendar_engine-0.2.3 app/views/attendees/index.html.erb
event_calendar_engine-0.2.2 app/views/attendees/index.html.erb
event_calendar_engine-0.2.1 app/views/attendees/index.html.erb
event_calendar_engine-0.2.0 app/views/attendees/index.html.erb
event_calendar_engine-0.1.11 app/views/attendees/index.html.erb
event_calendar_engine-0.1.10 app/views/attendees/index.html.erb
event_calendar_engine-0.1.9 app/views/attendees/index.html.erb
event_calendar_engine-0.1.8 app/views/attendees/index.html.erb
event_calendar_engine-0.1.7 app/views/attendees/index.html.erb
event_calendar_engine-0.1.6 app/views/attendees/index.html.erb