<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -8,4 +8,4 @@ development: development_db_name
 production: production_db_name
 
 = Required Gems =
-* validatable, json, couchrest, activesupport
\ No newline at end of file
+* validatable, json, couchrest &gt;= 0.9.12, activesupport
\ No newline at end of file</diff>
      <filename>INSTALL</filename>
    </modified>
    <modified>
      <diff>@@ -78,8 +78,11 @@ h4. Finding stuff
 
 For running basic finds (e.g. creating/querying views) you can either use the CouchPotato::Persistence::Finder class:
 
-  user = User.create! :first_name =&gt; 'joe'
-  Finder.new.find User, :first_name =&gt; 'joe' # =&gt; [user]
+  joe = User.create! :first_name =&gt; 'joe', :position =&gt; 1
+  jane = User.create! :first_name =&gt; 'jane', :position =&gt; 2
+  Finder.new.find User, :first_name =&gt; 'joe' # =&gt; [joe]
+  Finder.new.find User, :first_name =&gt; ['joe', 'jane'] # =&gt; [joe, jane]
+  Finder.new.find User, :position =&gt; 1..2 # =&gt; [joe, jane]
   
 You can also count:
 </diff>
      <filename>README.textile</filename>
    </modified>
    <modified>
      <diff>@@ -166,6 +166,12 @@ module CouchPotato
         instance
       end
       
+      def create(attributes = {})
+        instance = self.new attributes
+        instance.save
+        instance
+      end
+      
       def get(id)
         begin
           self.json_create db.get(id)</diff>
      <filename>lib/couch_potato/persistence.rb</filename>
    </modified>
    <modified>
      <diff>@@ -72,11 +72,23 @@ module CouchPotato
       def search_keys(params)
         if params[:search_values].select{|v| v.is_a?(Range)}.any?
           {:startkey =&gt; params[:search_values].map{|v| v.is_a?(Range) ? v.first : v}, :endkey =&gt; params[:search_values].map{|v| v.is_a?(Range) ? v.last : v}}
+        elsif params[:search_values].select{|v| v.is_a?(Array)}.any?
+          {:keys =&gt; prepare_multi_key_search(params[:search_values])}
         else
           {:key =&gt; params[:search_values]}
         end
       end
       
+      def prepare_multi_key_search(values)
+        array = values.select{|v| v.is_a?(Array)}.first
+        index = values.index array
+        array.map do |item|
+          copy = values.dup
+          copy[index] = item
+          copy
+        end
+      end
+      
       def view_parameters(clazz, options)
         {
           :class =&gt; clazz,
@@ -89,7 +101,7 @@ module CouchPotato
       end
       
       def view_name(options)
-        options.to_a.map(&amp;:first).join('_and_')
+        options.to_a.sort_by{|f| f.first.to_s}.map(&amp;:first).join('_and_')
       end
     end
   end</diff>
      <filename>lib/couch_potato/persistence/finder.rb</filename>
    </modified>
    <modified>
      <diff>@@ -11,6 +11,24 @@ describe CouchPotato::Persistence::Finder, 'find' do
     CouchPotato::Persistence.Db.delete!
   end
   
+  describe &quot;couchdb 0.9+&quot; do
+    it &quot;should find items by an array of values&quot; do
+      c1 = Comment.create! :title =&gt; 'test', :commenter_id =&gt; '1'
+      c2 = Comment.create! :title =&gt; 'test', :commenter_id =&gt; '2'
+      c3 = Comment.create! :title =&gt; 'test', :commenter_id =&gt; '3'
+      comments = CouchPotato::Persistence::Finder.new.find Comment, :commenter_id =&gt; ['2', '3']
+      comments.should == [c2, c3]
+    end
+    
+    it &quot;should find items by an array of values combined with other attributes&quot; do
+      c1 = Comment.create! :title =&gt; 'test', :commenter_id =&gt; '1'
+      c2 = Comment.create! :title =&gt; 'test', :commenter_id =&gt; '2'
+      c3 = Comment.create! :title =&gt; 'test2', :commenter_id =&gt; '3'
+      comments = CouchPotato::Persistence::Finder.new.find Comment, :commenter_id =&gt; ['2', '3'], :title =&gt; 'test'
+      comments.should == [c2]
+    end
+  end
+  
   it &quot;should find objects with a given attribute value pair&quot; do
     c1 = Comment.create! :title =&gt; 'test', :commenter_id =&gt; '1'
     c2 = Comment.create! :title =&gt; 'test', :commenter_id =&gt; '2'</diff>
      <filename>spec/finder_spec.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>b0b8b363c8bf747a83f8a92cf1155b8c88e93805</id>
    </parent>
  </parents>
  <author>
    <name>Alexander Lang</name>
    <email>alex@skywalker.lan</email>
  </author>
  <url>http://github.com/langalex/couch_potato/commit/8a76caa0340ba5998a92d4a41be3b0a76c8666b4</url>
  <id>8a76caa0340ba5998a92d4a41be3b0a76c8666b4</id>
  <committed-date>2008-10-26T08:13:16-07:00</committed-date>
  <authored-date>2008-10-26T08:13:16-07:00</authored-date>
  <message>added find by array of values (couchdb 0.9 only)</message>
  <tree>385287ac787a9ebfb5640dba0b924df5aa4ad4aa</tree>
  <committer>
    <name>Alexander Lang</name>
    <email>alex@skywalker.lan</email>
  </committer>
</commit>
