app/views/cohortly/metrics/index.html.erb in cohortly-0.0.1 vs app/views/cohortly/metrics/index.html.erb in cohortly-0.0.2
- old
+ new
@@ -7,16 +7,25 @@
<%= f.text_field :user_id %>
</div>
<%= render :partial => 'cohortly/metrics/tags' %>
<%= f.submit "filter" %>
<% end %>
+
+<% url_gen = lambda {|page| cohortly_metrics_path({:cohortly_metric => params[:cohortly_metric], :page => page}) } %>
+<%= render :partial => 'pagination',
+ :object => @metrics,
+ :locals => { :url_gen => url_gen} %>
<table class="hor-zebra">
<tr>
<th>User</th>
- <th>User Email</th>
+ <th>Username</th>
<th>Time</th>
<th>Controller</th>
<th>Action</th>
<th>Tags</th>
</tr>
<%= render :collection => @metrics, :partial => 'metric' %>
</table>
+
+<%= render :partial => 'pagination',
+ :object => @metrics,
+ :locals => { :url_gen => url_gen} %>