admino 0.0.19 → 0.0.20

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: 8f5c98a84d136df047c6b0a7314087a6b64a03d5
4
- data.tar.gz: aa0fd8fd261fb7003a6aed5ea99e710ad7bc5e6b
3
+ metadata.gz: 8099acd148d47f461992d023c4ae8d1bd76b3c5c
4
+ data.tar.gz: 3dcf581e206ca9c8ff6536341efecdb2a63ce959
5
5
  SHA512:
6
- metadata.gz: f27bb50367949fbfb2af01a9f6124c8b1a406d58322d4c9d58d6a25297ff703bd454cfb34224a1b9084ab4c9df58685de7e1d3b325477aa5cb0576c3f3fdae96
7
- data.tar.gz: e409ce85d7f23fb4d861b461c4e9900634f04624a410e312eaef89a1baa037e2e11ddcb3102c015b662021aff38b8a91e785f4e22ecd34b13aac0dae4e6eae66
6
+ metadata.gz: c2906889d6c3919913c07e119923cb4311c1d834082123907cf5d8a83a6369812811fb9cbbb1ced9b2ce1fbf10633f1c4ace1653db01a2ee855162e82fe3f08b
7
+ data.tar.gz: 02da5a3a0fe4cb41c1e0473c663a1ee8bb13e157a94e16770b623bc292a2a5328b393e0d56923a45a0070c6f11335f7b708be83661d1438a1ef4af22ed46e5b3
data/README.md CHANGED
@@ -202,7 +202,7 @@ end
202
202
 
203
203
  ### Let the query object do the chaining
204
204
 
205
- If you do not want to pollute your ActiveRecord model with all these scopes, you are free to implement the scopes on the query object itself:
205
+ If you do not want to pollute your ActiveRecord model with all these scopes, you are free to implement them on the query object itself (just make sure to suffix them with `_scope`):
206
206
 
207
207
  ```ruby
208
208
  class Task < ActiveRecord::Base
@@ -211,7 +211,7 @@ end
211
211
  class TasksQuery < Admino::Query::Base
212
212
  search_field :title_matches
213
213
 
214
- def title_matches(scope, text)
214
+ def title_matches_scope(scope, text)
215
215
  scope.where('title ILIKE ?', "%#{text}%")
216
216
  end
217
217
  end
@@ -39,14 +39,14 @@ module Admino
39
39
 
40
40
  def search_form_for(query, options = {}, &block)
41
41
  options.symbolize_keys!
42
- options.assert_valid_keys(:presenter)
43
- Internals.present_query(query, self, options).form(&block)
42
+ Internals.present_query(query, self, options.slice(:presenter)).
43
+ form(options, &block)
44
44
  end
45
45
 
46
46
  def simple_search_form_for(query, options = {}, &block)
47
47
  options.symbolize_keys!
48
- options.assert_valid_keys(:presenter)
49
- Internals.present_query(query, self, options).simple_form(&block)
48
+ Internals.present_query(query, self, options.slice(:presenter)).
49
+ simple_form(options, &block)
50
50
  end
51
51
  end
52
52
  end
@@ -1,3 +1,3 @@
1
1
  module Admino
2
- VERSION = "0.0.19"
2
+ VERSION = "0.0.20"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: admino
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.19
4
+ version: 0.0.20
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stefano Verna
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-04-18 00:00:00.000000000 Z
11
+ date: 2016-04-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: showcase