bolter 0.3.3 → 0.3.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/bolter/searchable.rb +1 -1
- data/lib/bolter/sortable.rb +1 -1
- data/lib/bolter/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 194215c42aa774f391f249469fed2f50f9381840
|
4
|
+
data.tar.gz: 781bbec1af8bac0b4f8a5732c93d1cb729717cda
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ab16c0ef7dc096c775280ed054a660b1dae74887987bd674ab34f39a3e034e084d4bbb0641fda984ee2d5e9179bbce7d4ff255dfe12d65e7cb3f57ccd58c4d59
|
7
|
+
data.tar.gz: 003f49f8e68ddf4693cee5fd249e5f2778dd7039556e588b3fc86b9d3d5728e92e5013fc8ee1e21fafc880be8497657a7866913f62d91d06f7f92585000a6d92
|
data/lib/bolter/searchable.rb
CHANGED
@@ -4,7 +4,7 @@ module Bolter
|
|
4
4
|
included do
|
5
5
|
cattr_reader :used_as_filters
|
6
6
|
def self.search(params = {}, options = {})
|
7
|
-
result = self
|
7
|
+
result = self.current_scope
|
8
8
|
# Prepare params to search
|
9
9
|
search = (params || {}).clone.reject{|_,value| value.to_s.empty? }
|
10
10
|
# Apply filters
|
data/lib/bolter/sortable.rb
CHANGED
@@ -7,7 +7,7 @@ module Bolter
|
|
7
7
|
field, direction = sorting.split(':',2)
|
8
8
|
if self.attribute_names.include? field.to_s
|
9
9
|
if %W[asc desc].include? direction
|
10
|
-
return self.reorder(Hash[field, direction])
|
10
|
+
return self.current_scope.reorder(Hash[field, direction])
|
11
11
|
end
|
12
12
|
else
|
13
13
|
self.order({})
|
data/lib/bolter/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bolter
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Evgeniy Shurmin
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-05
|
11
|
+
date: 2016-06-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|