spec/dummy/app/views/pages/index.html.erb in impressionizer-0.0.3 vs spec/dummy/app/views/pages/index.html.erb in impressionizer-0.0.4
- old
+ new
@@ -1,21 +1,29 @@
<h1>Listing pages</h1>
+<p>Page index impressions: <%= Page.impressions_for_action('index') %></p>
+<p>Page with most impressions: <%= Page.most_impressions.first.title %></p>
+<p>Page with most unique impressions: <%= Page.most_unique_impressions.first.title %></p>
+<p>Page new impressions: <%= Page.impressions_for_action('new') %></p>
+<p>Page show impressions: <%= Page.impressions_for_action('show') %></p>
+
<table>
<tr>
<th>Title</th>
<th>Body</th>
<th>Impression Count</th>
+ <th>Unique Impression Count</th>
<th></th>
<th></th>
<th></th>
</tr>
<% @pages.each do |page| %>
<tr>
<td><%= page.title %></td>
<td><%= page.body %></td>
<td><%= page.impression_count %></td>
+ <td><%= page.unique_impression_count %></td>
<td><%= link_to 'Show', page %></td>
<td><%= link_to 'Edit', edit_page_path(page) %></td>
<td><%= link_to 'Destroy', page, :confirm => 'Are you sure?', :method => :delete %></td>
</tr>
<% end %>