fix stats (i think)

This commit is contained in:
Kyle Drake 2015-02-02 14:27:54 -08:00
parent 4da6fe9da4
commit 963bb29d9d
2 changed files with 1 additions and 18 deletions

View file

@ -23,7 +23,7 @@ get '/stats/?' do
now = Date.today
while runner.to_time < now.to_time
while Date.new(runner.year, runner.month, 1) <= Date.new(now.year, now.month, 1)
monthly_stats.push(
date: runner,
sites_created: Site.where(created_at: runner..runner.next_month).count,

View file

@ -75,23 +75,6 @@
Cancelled: <strong><%= @stats[:cancelled_subscriptions] %></strong>
</h3>
<!--
<table class="table">
<tr>
<th>Status</th>
<th>Amount</th>
<th>Date Subscribed</th>
</tr>
<% @stats[:subscriptions].each do |sub| %>
<tr>
<td><%= sub[:status] %></td>
<td><%= sub[:amount].nil? ? '$0.00' : format("$%.2f", sub[:amount]) %></td>
<td><%= sub[:created_at].strftime('%Y %B') %></td>
</tr>
<% end %>
</table>
-->
<h2>Burn Rate</h2>
<p>
Approximate server expenses (burn rate): <strong><%= format("$%.2f", @stats[:expenses]) %>/mo</strong>