Sha256: d498dc19f7aab28070944a3749481d21e9c4732010d3c27c4641b7af03f419e8
Contents?: true
Size: 387 Bytes
Versions: 1
Compression:
Stored size: 387 Bytes
Contents
# encoding: utf-8 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
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
dusen-0.2.2 | spec/shared/app_root/app/models/user.rb |