Created
January 11, 2009 08:31
-
-
Save pat/45670 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class User < ActiveRecord::Base | |
define_index do | |
indexes description | |
has id | |
end | |
end | |
>> User.create(:id=> 555,:description => "test").save | |
>> User.create(:id=> 556,:description => "test").save | |
>> User.create(:id=> 557,:description => "test").save | |
>> User.search "test", :with => {:id => [555]} | |
=> [#<User id: 555, description: "test">] | |
>> User.search "test", :with => {:id => [555,556]} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment