dusen 0.6.0 → 0.6.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -89,7 +89,7 @@ module Dusen
89
89
  end
90
90
 
91
91
  def where_like(conditions, options = {})
92
- scope = self
92
+ scope = scoped
93
93
  if options[:negate]
94
94
  match_operator = 'NOT LIKE'
95
95
  join_operator = 'AND'
@@ -1,5 +1,5 @@
1
1
  # encoding: utf-8
2
2
 
3
3
  module Dusen
4
- VERSION = '0.6.0'
4
+ VERSION = '0.6.1'
5
5
  end
@@ -214,6 +214,12 @@ shared_examples_for 'model with search syntax' do
214
214
  subject.where_like({ :city => ['word1', 'word2'] }, :negate => true).to_a.should =~ [match]
215
215
  end
216
216
 
217
+ it "doesn't match NULL values" do
218
+ no_match = subject.create!(:city => nil)
219
+ match = subject.create!(:city => 'word3')
220
+ subject.where_like({ :city => ['word1'] }, :negate => true).to_a.should =~ [match]
221
+ end
222
+
217
223
  end
218
224
 
219
225
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dusen
3
3
  version: !ruby/object:Gem::Version
4
- hash: 7
4
+ hash: 5
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 6
9
- - 0
10
- version: 0.6.0
9
+ - 1
10
+ version: 0.6.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - Henning Koch