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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 086ffa196f4e51aafae04c5606f5bbb7261798f8
|
4
|
+
data.tar.gz: 5cdfec26ae80c3a31436ccd5e773c092908b8b4d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
data/lib/quick_count/railtie.rb
CHANGED
@@ -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"
|
data/lib/quick_count/version.rb
CHANGED
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.
|
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-
|
11
|
+
date: 2017-04-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: pg
|