rails_admin_charts 0.0.7 → 0.0.8

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b28b8fbaf851df79c1604a3f40a24e4ffaf48d41
4
- data.tar.gz: 255aa1901b9e512687cb6ffd64a52ea4fc6c6e14
3
+ metadata.gz: e62900d965ae0d4923160d4b8eb68bffb75fd44b
4
+ data.tar.gz: b6e3aef9a8d190c871da55c078e458fcf2da9e0a
5
5
  SHA512:
6
- metadata.gz: 95ac7d2558a29b62c0b266a88ddda3c63198886d9b9a426a7aab31bbac6f90b234c9a5da030ab6915ec52f4c62dc5800c9d29297172532ea6a7255703f2d858a
7
- data.tar.gz: b724050ff76a749ef8d4ff49494dcf431c8f451232ced56849eab1e95485d254c6975b8a91673ad28c5a14ee50172d03e2cb8c04fcb48bb1db1bb1b7b905d6ee
6
+ metadata.gz: fdf82ac4b2b2666eee840f66d1a5e84516751a7049c4d722c0164fa897fdaf84ec2df97d4be99359f4961d45d9de6b11ee23112ed3aac157dbdd7b011f37e0e4
7
+ data.tar.gz: 80420584ed3204599738d3041372322e5ff673688bdbb79ea3942960375a3f68feca06224721c83db86d474df960a1a839f1e01c1e6121d412cdd36c37fa1a51
@@ -9,15 +9,15 @@ module RailsAdminCharts
9
9
  module ClassMethods
10
10
  def total_records_since(since = 30.days.ago)
11
11
  totals, before_count = self.group('DATE(created_at)').count, self.where('created_at < ?', since.to_date).count
12
- (since.to_date..Date.today).each_with_object([]) { |day, a| a << (a.last || before_count) + (totals[day] || 0) }
12
+ (since.to_date..Date.today).each_with_object([]) { |day, a| a << (a.last || before_count) + (totals[day.to_s] || 0) }
13
13
  end
14
14
 
15
15
  def delta_records_since(since = 30.days.ago)
16
16
  deltas = self.group('DATE(created_at)').count
17
- (since.to_date..Date.today).map { |date| deltas[date] || 0 }
17
+ (since.to_date..Date.today).map { |date| deltas[date.to_s] || 0 }
18
18
  end
19
19
 
20
- def graph_data since=30.days.ago
20
+ def graph_data(since=30.days.ago)
21
21
  [
22
22
  {
23
23
  name: model_name.plural,
@@ -1,3 +1,3 @@
1
1
  module RailsAdminCharts
2
- VERSION = '0.0.7'
2
+ VERSION = '0.0.8'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails_admin_charts
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.7
4
+ version: 0.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Paul Geraghty