ecm_core_info_backend 0.0.4 → 0.0.5

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: 55b810fbacd9df2a8843c55289de784c14338e7a
4
- data.tar.gz: 86090f2cabbef65862cd8bc431a85c9ddf148142
3
+ metadata.gz: 066ee2af6b751a0a3adc73a0ced71c4a4343595c
4
+ data.tar.gz: 5d9c1c514630826159ea20014f7585b5426afdcb
5
5
  SHA512:
6
- metadata.gz: cd2657df8cfe1a8db08d4786273da34f2970c1a8417f436bab653fa635bcd45fbb386c33e4e9a0d24a556910acbb194d8cbc67093bb2b0e3c86076fda5b07c2a
7
- data.tar.gz: 56498f6c30f1b8ccb078ebb05b3843a884c9435c12d4411ef6fc1998fdf460632b770879d9144298856e8fe9b03a4e1ceba386bc85c680d78443b724e2845f06
6
+ metadata.gz: 086f098a687a9dfc506ba74e277467b8f3492f3114a40a7924b50fee24d377f59b2e3cf375e86869b0d6a8e33f7dbe9e6d15bf44dd8d1cfd2da556509e4b0e6b
7
+ data.tar.gz: 0f73b37b62aba3545fd0beeaab643b7bcfd88d0c03ca6a9b840ef5363496b06a409ee9f1d7142b4be8330cdc2908d9ad24d723e4e40e903a908a3552aefbd812
@@ -7,15 +7,23 @@ module Ecm::CoreInfo::Backend
7
7
  private
8
8
 
9
9
  def collection_scope
10
- if Itsf::Backend.features?(:kaminari)
11
- Kaminari.paginate_array(resource_class.all)
10
+ if features?(:kaminari)
11
+ Kaminari.paginate_array(resource_class.all).page(params[:page])
12
12
  else
13
- super
13
+ resource_class.all
14
14
  end
15
15
  end
16
16
 
17
+ def load_collection
18
+ collection_scope
19
+ end
20
+
17
21
  def to_param_method
18
22
  :class
19
23
  end
24
+
25
+ def disabled_features
26
+ [:ransack]
27
+ end
20
28
  end
21
29
  end
@@ -8,20 +8,28 @@ module Ecm::CoreInfo::Backend
8
8
 
9
9
  private
10
10
 
11
+ def disabled_features
12
+ [:ransack]
13
+ end
14
+
11
15
  def to_param_method
12
16
  :name
13
17
  end
14
18
 
15
19
  def collection_scope
16
- if Itsf::Backend.features?(:kaminari)
17
- Kaminari.paginate_array(resource_class.find_all.to_a)
20
+ if features?(:kaminari)
21
+ Kaminari.paginate_array(resource_class.find_all.to_a).page(params[:page])
18
22
  else
19
- super
23
+ resource_class.find_all.to_a
20
24
  end
21
25
  end
22
26
 
23
27
  def load_resource
24
28
  resource_class.find_by_name(params[:id])
25
29
  end
30
+
31
+ def load_collection
32
+ collection_scope
33
+ end
26
34
  end
27
35
  end
@@ -1,7 +1,7 @@
1
1
  module Ecm
2
2
  module CoreInfo
3
3
  module Backend
4
- VERSION = '0.0.4'.freeze
4
+ VERSION = '0.0.5'.freeze
5
5
  end
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ecm_core_info_backend
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Roberto Vasquez Angel
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-10-07 00:00:00.000000000 Z
11
+ date: 2016-10-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails