spec/shared/app_root/app/models/user/without_fulltext.rb in dusen-0.5.1 vs spec/shared/app_root/app/models/user/without_fulltext.rb in dusen-0.5.2

- old
+ new

@@ -25,9 +25,16 @@ search_by :role do |scope, role| scope.scoped(:conditions => { :role => role }) end + search_by :name_and_city_regex do |scope, regex| + #Example for regexes that need to be and'ed together by syntax#build_exclude_scope + first = scope.where("users_without_fulltext.name REGEXP ?", regex) + second = scope.where("users_without_fulltext.city REGEXP ?", regex) + first.merge(second) + end + end end end