diff options
Diffstat (limited to 'app')
-rw-r--r-- | app/controllers/quotes_controller.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/controllers/quotes_controller.rb b/app/controllers/quotes_controller.rb index a0aa7cd..b6ddb6a 100644 --- a/app/controllers/quotes_controller.rb +++ b/app/controllers/quotes_controller.rb | |||
@@ -54,7 +54,7 @@ class QuotesController < ApplicationController | |||
54 | year = i.months.ago.year | 54 | year = i.months.ago.year |
55 | beginning = i.months.ago.beginning_of_month.beginning_of_day | 55 | beginning = i.months.ago.beginning_of_month.beginning_of_day |
56 | endtime = i.months.ago.end_of_month.end_of_day | 56 | endtime = i.months.ago.end_of_month.end_of_day |
57 | quotes = Quote.where("created_at >= :start_date AND created_at <= :end_date", { :start_date => beginning, :end_date => endtime }).all | 57 | quotes = Quote.published.where("created_at >= :start_date AND created_at <= :end_date", { :start_date => beginning, :end_date => endtime }).all |
58 | @months[11-i] = { :name => Date::MONTHNAMES[month], :number => quotes.count } | 58 | @months[11-i] = { :name => Date::MONTHNAMES[month], :number => quotes.count } |
59 | end | 59 | end |
60 | 60 | ||
@@ -102,7 +102,7 @@ class QuotesController < ApplicationController | |||
102 | } | 102 | } |
103 | 103 | ||
104 | person_count = {} | 104 | person_count = {} |
105 | Quote.all.each do |quote| | 105 | Quote.published.each do |quote| |
106 | person_in_quote = {} | 106 | person_in_quote = {} |
107 | 107 | ||
108 | quote.content.split("\n").each do |line| | 108 | quote.content.split("\n").each do |line| |