Sha256: 37f8fc0986d175e40d9660bf43710c9ab99d12815e207e480f1bb5faa35646c6
Contents?: true
Size: 368 Bytes
Versions: 3
Compression:
Stored size: 368 Bytes
Contents
class User < ActiveRecord::Base search_syntax do search_by :text do |scope, text| scope.where_like([:name, :email, :city] => text) end search_by :city do |scope, city| scope.scoped(:conditions => { :city => city }) end search_by :email do |scope, email| scope.scoped(:conditions => { :email => email }) end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
dusen-0.2.1 | spec/shared/app_root/app/models/user.rb |
dusen-0.2.0 | spec/shared/app_root/app/models/user.rb |
dusen-0.1.0 | spec/shared/app_root/app/models/user.rb |