filterer 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/filterer/base.rb +2 -2
- data/lib/filterer/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 852f75a7abb5961f620080843aa3c4e27f801cda
|
4
|
+
data.tar.gz: fb3a53d1e407ed3f78c35d8180ea07625f9c8aef
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a913462e9c327201503d837f81d9c559f1808eaff8fc0a32fe3d5daa0cd18ecd258d6f921d9b422d5b05202a2d70c14703b05e5e1af5ecad89e8c3a43403cf41
|
7
|
+
data.tar.gz: 4e6fab8accf2ccbd61803c0108c722f20e3b0bd48b14428e255aa5b08e62db3cf7cbc99efafbe7199f96459c4483b0bd9479c388b767df859bcecac4360c6512
|
data/lib/filterer/base.rb
CHANGED
@@ -3,7 +3,7 @@ module Filterer
|
|
3
3
|
|
4
4
|
IGNORED_PARAMS = [:page]
|
5
5
|
|
6
|
-
attr_accessor :results, :meta, :direction, :sort, :params
|
6
|
+
attr_accessor :results, :meta, :direction, :sort, :params, :opts
|
7
7
|
|
8
8
|
class << self
|
9
9
|
attr_accessor :sort_options
|
@@ -109,7 +109,7 @@ module Filterer
|
|
109
109
|
}.squish
|
110
110
|
elsif get_sort_option(@sort)[:query_string_or_proc].is_a?(Proc)
|
111
111
|
matches = get_sort_option(@sort)[:key].is_a?(Regexp) ? @sort.match(get_sort_option(@sort)[:key]) : nil
|
112
|
-
@results = get_sort_option(@sort)[:query_string_or_proc].call(@results, matches)
|
112
|
+
@results = get_sort_option(@sort)[:query_string_or_proc].call(@results, matches, self)
|
113
113
|
end
|
114
114
|
end
|
115
115
|
|
data/lib/filterer/version.rb
CHANGED
metadata
CHANGED
@@ -1,27 +1,27 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: filterer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Adam Becker
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-12-
|
11
|
+
date: 2013-12-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - '>='
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: 4.0.0
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- -
|
24
|
+
- - '>='
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: 4.0.0
|
27
27
|
- !ruby/object:Gem::Dependency
|