lato 3.13.17 → 3.13.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/app/helpers/lato/components_helper.rb +1 -1
- data/lib/lato/kaminari_extensions.rb +13 -0
- data/lib/lato/version.rb +1 -1
- data/lib/lato.rb +1 -0
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9304badc09690e06e70b683dc178ffe057eb25a92a47bf9cea18954e0b796872
|
4
|
+
data.tar.gz: e7ebd7677622026e4d3be1d5975f4060566ee88c464640b83e3c3eff7f627de8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2383c56456d340cf749cea8b89441a9fef6f214296a23950872ce7d34830a068f077bd1283175f3e8da4fc25039128648322a1b0bd42b14849b7a37df2310ddc
|
7
|
+
data.tar.gz: 62c77057415ddb510fb636a465bbfeef465688981a56eee17734ed4495ff57cfcf885bc1e918b2534e0afe085368dd1bd2da0b69cba03b2c6ede831da3b0d958
|
@@ -52,7 +52,7 @@ module Lato
|
|
52
52
|
searchable_columns = @_lato_index[key][:searchable_columns] || []
|
53
53
|
model_name = options[:model_name] || collection.model.name
|
54
54
|
model_name_underscore = options[:model_name] || model_name.underscore.gsub('/', '_')
|
55
|
-
pagination_options = options[:pagination_options] || nil
|
55
|
+
pagination_options = options[:pagination_options] || nil
|
56
56
|
skip_total_count = options[:skip_total_count] || false
|
57
57
|
|
58
58
|
render(
|
@@ -0,0 +1,13 @@
|
|
1
|
+
# NOTE: Hard fix taken from https://gist.github.com/sononum/6183139 from kaminari issue https://github.com/search?q=repo%3Akaminari%2Fkaminari%20def%20total_count&type=code
|
2
|
+
|
3
|
+
module Kaminari
|
4
|
+
module PageScopeMethods
|
5
|
+
def total_count
|
6
|
+
if ActiveRecord::Base.connection.adapter_name.downcase == "postgresql"
|
7
|
+
@_hacked_total_count || (@_hacked_total_count = self.connection.execute("SELECT (reltuples)::integer FROM pg_class r WHERE relkind = 'r' AND relname ='#{table_name}'").first["reltuples"].to_i)
|
8
|
+
else
|
9
|
+
super
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
data/lib/lato/version.rb
CHANGED
data/lib/lato.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lato
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.13.
|
4
|
+
version: 3.13.18
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gregorio Galante
|
@@ -273,6 +273,7 @@ files:
|
|
273
273
|
- lib/lato/config.rb
|
274
274
|
- lib/lato/dependency_helper.rb
|
275
275
|
- lib/lato/engine.rb
|
276
|
+
- lib/lato/kaminari_extensions.rb
|
276
277
|
- lib/lato/version.rb
|
277
278
|
- lib/tasks/lato_tasks.rake
|
278
279
|
homepage: https://github.com/Lato-org/lato
|