Permalink
Browse files

Regexp's don't match with CASE sensitivity for mongoid finds

  • Loading branch information...
1 parent 807bf9a commit b7d11c55602f9df8d771844b76fb4a85f74f4974 @jonpaul committed Oct 26, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/tabulatr/tabulatr/finder.rb
@@ -91,7 +91,7 @@ def self.condition_from(rel, typ, n, v)
rel = rel.where("#{n} #{@like} ?", "%#{v[:like]}%")
elsif typ==:mongoid
nn = n.split('.').last
- rel = rel.where(nn => Regexp.new(v[:like]))
+ rel = rel.where(nn => Regexp.new(v[:like], true))
else
raise "Unknown db type '#{typ}'"
end

0 comments on commit b7d11c5

Please sign in to comment.