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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6f7f83a26a792b70a4af0c6bc8d790da997dce6a
4
- data.tar.gz: 83e3deeef8849769a5b52116fd759614d22cc131
3
+ metadata.gz: 194215c42aa774f391f249469fed2f50f9381840
4
+ data.tar.gz: 781bbec1af8bac0b4f8a5732c93d1cb729717cda
5
5
  SHA512:
6
- metadata.gz: 7e558d1e82047e628e408be6dcc4e85eda0ad2d52bb8c4654ad654d7717bb2239bdc1ae009c2c0b6d5f10c5ad8d41d6b62e2a13dc9afb09d7011c862fd2e2bcc
7
- data.tar.gz: dc1f56e81f4e211ff0b93ebeb6ab9fd9c2f254538726be4e3a39b5a64c2d9c51bd9bf278e66e3f032cb5b65b3ffb817b7109dc9b3885e0bb85ff4e12408cca54
6
+ metadata.gz: ab16c0ef7dc096c775280ed054a660b1dae74887987bd674ab34f39a3e034e084d4bbb0641fda984ee2d5e9179bbce7d4ff255dfe12d65e7cb3f57ccd58c4d59
7
+ data.tar.gz: 003f49f8e68ddf4693cee5fd249e5f2778dd7039556e588b3fc86b9d3d5728e92e5013fc8ee1e21fafc880be8497657a7866913f62d91d06f7f92585000a6d92
@@ -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
@@ -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({})
@@ -1,3 +1,3 @@
1
1
  module Bolter
2
- VERSION = '0.3.3'
2
+ VERSION = '0.3.4'
3
3
  end
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.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-29 00:00:00.000000000 Z
11
+ date: 2016-06-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler