quick_count 0.0.2 → 0.0.3

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: 2c460d264424aeda14e8f593465e17425dca7fac
4
- data.tar.gz: b2e0b54686180053afc2726ab7186b690735f80c
3
+ metadata.gz: 086ffa196f4e51aafae04c5606f5bbb7261798f8
4
+ data.tar.gz: 5cdfec26ae80c3a31436ccd5e773c092908b8b4d
5
5
  SHA512:
6
- metadata.gz: 82e0482436336ebcb1810d73e051435a7c215e1e0a73917b9d11464ecf15d8300f79634b1e15f9ae0223998798f0841629f5da2b7b55725c4d727f6b3a32d205
7
- data.tar.gz: 855be602cff1d114638664896baaef61f1496085327851d66f0c1d7cc5b119cba150229a80a740989c768e98008d5c52b950647fa520ade73952032d80a5f844
6
+ metadata.gz: 5df7f86701fe465b2f0473cbfb2b102eb720b2937ad5282b51c6653b55d99fc42de85667a301e84601c7fb6f86b4d59e3a94b8a52a25de6e812cfed729ec51e8
7
+ data.tar.gz: 4a98a3b18957915128191a55555ec4b75345bd92a3624c2c735687712f85733540ed9771e4f6bf3e9e57e9ab671aa1c4cad48e083e8e84348d2dc2fa49b174f6
@@ -7,7 +7,7 @@ module CountEstimate
7
7
  def count_estimate
8
8
  my_statement = ::ActiveRecord::Base.connection.quote(to_sql)
9
9
  result = ::ActiveRecord::Base.connection.execute("SELECT count_estimate(#{my_statement})")
10
- result[0]["count_estimate"]
10
+ result[0]["count_estimate"].to_i
11
11
  end
12
12
 
13
13
  end
@@ -9,7 +9,7 @@ module QuickCount
9
9
 
10
10
  def quick_count
11
11
  result = ::ActiveRecord::Base.connection.execute("SELECT quick_count('#{table_name}')")
12
- result[0]["quick_count"]
12
+ result[0]["quick_count"].to_i
13
13
  end
14
14
 
15
15
  def count_estimate
@@ -1,10 +1,9 @@
1
1
  require 'rails/railtie'
2
2
  require 'quick_count/active_record/base'
3
3
  require 'count_estimate/active_record/relation'
4
- require 'pry'
5
4
 
6
5
  module QuickCount
7
- class Railtie < Rails::Railtie
6
+ class Railtie < ::Rails::Railtie
8
7
 
9
8
  # rake_tasks do
10
9
  # load "../tasks/quick_count_tasks.rake"
@@ -1,3 +1,3 @@
1
1
  module QuickCount
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: quick_count
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dale Stevens
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-04-08 00:00:00.000000000 Z
11
+ date: 2017-04-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pg