templus_models 3.0.19 → 3.0.20

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ba2c9b6e98d4eb10bda335f5153fb63a33acb7b0d273f6b5de29e426b2785421
4
- data.tar.gz: b9e858f0d3cbaa70ca5cbacfbb83e6e44736fa6b0550c6ac3dfb8ee1688e4f65
3
+ metadata.gz: ceddeb835a1405f5013bf6d95cb6a2e0a2ef3fde23ca98904dedb189c670b680
4
+ data.tar.gz: 1c86d3fb910903056745b1767ad4d7044de431e9685073253124dd5634ce308d
5
5
  SHA512:
6
- metadata.gz: f48beda05e9d271ce7811f2a147beee85e7cab5cdd056cc861285daa78e58fa7f1d5b6b7cb3e3b2dece5713c6b5930a3448d02c5272b4a1eb233680c5ee32753
7
- data.tar.gz: 1c6bd572c9a7d6efeaf8b5b0b2df96fdce9d20b85bddec3fe2cdba5efe30f735c74b9ecb047419d05701c6d9685ea48642fcd5f8f482cfb73fab0cea90f71ec6
6
+ metadata.gz: 00d81588bf7dc3cea202de0d104369706142dbf3e7e7fa0f3c1fe8d9e997798e61d89071e6c3f7a4755332242ba82a7b677e4d889cefa405a2a3214ac1b3a8ef
7
+ data.tar.gz: e9a051ff22d1642fa8ededd6375dcf1bcfdd84636abc4b603b0edf88809d9a42f1bd63caea033d6019558d9af1a36fa5971631ee733a4f466c7e67ce7eaa72e5
@@ -35,7 +35,7 @@
35
35
  <% end %>
36
36
  </tbody>
37
37
  </table>
38
- <%= paginate @records, target: '#form', theme: 'templus'%>
38
+ <%= paginate @records, target: '#form', theme: 'templus' %>
39
39
  </div>
40
40
  <% end %>
41
41
  <script type="text/javascript">
@@ -15,10 +15,15 @@ Ransack.configure do |config|
15
15
  end
16
16
 
17
17
  module Kaminari
18
- module ActionViewExtension
19
- def paginate(scope, options = {}, &block)
20
- paginator = Kaminari::Helpers::Paginator.new self, options.reverse_merge(:current_page => scope.current_page, :total_pages => scope.total_pages, :per_page => scope.limit_value, :total_count => scope.total_count, :remote => false)
21
- paginator.to_s
18
+ module Helpers
19
+ module HelperMethods
20
+ def paginate(scope, paginator_class: Kaminari::Helpers::Paginator, template: nil, **options)
21
+ options[:total_pages] ||= scope.total_pages
22
+ options.reverse_merge! current_page: scope.current_page, per_page: scope.limit_value, total_pages: scope.total_pages, total_count: scope.total_count, remote: false
23
+
24
+ paginator = paginator_class.new (template || self), options
25
+ paginator.to_s
26
+ end
22
27
  end
23
28
  end
24
29
  end
@@ -1,3 +1,3 @@
1
1
  module TemplusModels
2
- VERSION = "3.0.19"
2
+ VERSION = "3.0.20"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: templus_models
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.19
4
+ version: 3.0.20
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rodrigo Sol
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2019-06-07 00:00:00.000000000 Z
13
+ date: 2019-06-28 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rails