mrkamel/search_cop

Search word that include % does not work correctly

Closed this issue · 2 comments

For example, items table has this records.

SELECT * FROM items;
id name
1 The 100% complete guide for Ruby on Rails
2 100G byte SSD
class Item < ApplicationRecord
  include SearchCop

  search_scope :search do
    attributes :name
  end

end

Item.search('100%')

I expected this returns a record with id 1 only. But, this returns both records.

thx for reporting. i agree. i'll change it.

available in 1.2.0