anonymous / _user.html.erb
Created

Embed URL

HTTPS clone URL

SSH clone URL

You can clone with HTTPS or SSH.

Download Gist

users/index

View _user.html.erb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
<% title "Events" %>
<table >
<tr>
<th><%= sortable "Starts_at" %></th>
<th><%= sortable "Finishes" %></th>
<th><%= sortable "Event_name" %></th>
<th><%= sortable "Tracks" %></th>
</tr>
<td>
<% @user.events.each do |event| %>
<tr>
<td><%= event.starts_at %></td>
<td><%= event.finishes %></td>
<td><%= event.event_name %></td>
<td><%= event.tracks %></td>
</tr>
<% end %>
 
</table>
View _user.html.erb
1 2 3 4 5 6 7
<h1>Listing events</h1>
 
<%= render :partial => "user", :collection => @users %>
 
<br />
 
<%= link_to 'New Event', new_event_path %>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.