collate 0.1.2 → 0.1.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: f6b83915624fb82cd112faccebbd22f5d298f651
4
- data.tar.gz: 959313f8d709d29499a7f8aad05e7187ee98c5e2
3
+ metadata.gz: e6e9c829cf7d2ee33ab2a3dcc18976a0dd398ffe
4
+ data.tar.gz: 4edbcc221115207821abe533c93a123a96bc9619
5
5
  SHA512:
6
- metadata.gz: b3ec77b60c452a7e81c0ad455a85d5b00c91c8cec73da5ce8433ae9bce4ba0765031c5cbbad4e5c8ea1fdc80464282a5efbf0b0f7e743be1351c073686d55026
7
- data.tar.gz: b167d550eb09ca697e0d99d373574926bf1448f360272470b3d0ca78fa013fee841660de221d43fe6241789611153e0845a9a1ea6bf9fa738d34d0e1ead19573
6
+ metadata.gz: 28caee2d1066e2e00c9b34d8dfe7fc2aa512a44d7c4db7fe862af92db92c5685c8a8e46b27c3b3308c46b5cdb49e4b51c2291c94e5dac432ce9399931fd9e41c
7
+ data.tar.gz: ee77a8b8330258f9c034c944a729b005f9396741e7994bc8f7ae4f823e12a19e4f50ac8daba9f34d877071fc9b376402a3106efaff8d8641792d21bd708d6fef
@@ -3,9 +3,11 @@ module Collate
3
3
  def filters_for_group record, group_key
4
4
  groups = record.model.collate_filters ||= {}
5
5
 
6
- group = groups[group_key]
6
+ group = groups[group_key] ||= {}
7
7
 
8
8
  filters = group[:filters] ||= []
9
+
10
+ filters
9
11
  end
10
12
 
11
13
  def filter_for filter
@@ -21,6 +21,8 @@ module Collate
21
21
  end
22
22
 
23
23
  def collate params
24
+ initialize_collate
25
+
24
26
  ar_rel = self.all
25
27
 
26
28
  self.collate_filters.each do |group_key, group|
@@ -1,3 +1,3 @@
1
1
  module Collate
2
- VERSION = "0.1.2"
2
+ VERSION = "0.1.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: collate
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nicholas Page