Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

BUGFIX: Looking up on an undefined label tag now returns all records,…

… not nil
  • Loading branch information...
commit feccbf78d467fac0308a1602e0f4ac94db810a0c 1 parent 599daab
@radar authored
View
2  Gemfile.lock
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
- searcher (0.0.1)
+ searcher (0.0.2)
activerecord (~> 3.0.0)
GEM
View
2  lib/searcher/class_methods.rb
@@ -19,7 +19,7 @@ def search(query)
end
end
- result
+ result || klass.all
end
end
end
View
BIN  searcher.sqlite3
Binary file not shown
View
6 spec/searcher_spec.rb
@@ -18,4 +18,10 @@
end
end
+ context "undefined label search" do
+ subject { Ticket.search("undefined:true") }
+ it "returns all the records" do
+ search_results.should eql(Ticket.all)
+ end
+ end
end
Please sign in to comment.
Something went wrong with that request. Please try again.