fix error
This commit is contained in:
parent
e6484f4a69
commit
fff118ac71
|
@ -134,10 +134,10 @@ module OrbitBackendHelper
|
|||
visitors_this_month = Rails.cache.fetch("visitors_this_month", expires_in: 1.day) do
|
||||
display_visitors(created_at: {'$gte' => Time.now.beginning_of_month})
|
||||
end
|
||||
visitors_this_month
|
||||
else
|
||||
@result_of_thirty_day[0..((Time.now-Time.now.beginning_of_month)/86400).floor].map{|v| v['count']}.reduce{|v,x| v+x}
|
||||
end
|
||||
visitors_this_month
|
||||
end
|
||||
|
||||
def display_visitors_this_year
|
||||
|
|
Loading…
Reference in New Issue