<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <filename>CHANGELOG</filename>
    </modified>
    <modified>
      <diff>@@ -1,6 +1,6 @@
 Goals
 =====
- - simple unobstrusive autocomplet
+ - simple unobstrusive autocomplete
  - JS-library-independent
  - Controller and Model helpers
 
@@ -17,7 +17,7 @@ Examples
 Controller
 ----------
 By default, `autocomplete_for` limits the results to 10 entries,
-and sorts by the given field.
+and sorts by the autocomplete field.
 
     class UsersController &lt; ApplicationController
       autocomplete_for :user, :name
@@ -51,19 +51,22 @@ use any library you like
     jQuery(function($){//on document ready
       //autocomplete
       $('input.autocomplete').each(function(){
-        var input = $(this);
-        input.autocomplete(input.attr('autocomplete_url'));
+        var $input = $(this);
+        input.autocomplete($input.attr('autocomplete_url'));
       });
     });
 
 Records (Optional)
 ------------------
  - Controller find works independent of this find
- - `@post.auto_user_name='Michael'` -&gt; `@post.user == User(name:Michael)` + `@post.auto_user_name=='Michael'`
+ - Tries to find the record by using autocomplete on the corresponding model
+    @post.auto_user_name='Michael'
+    @post.user == User.find_by_autocomplete_name('Michael')
+    @post.auto_user_name == 'Michael'
  - unfound record -&gt; nil
  - blank string -&gt; nil
 
-Example for a pos with autocompleted user name:
+Example for a post with autocompleted user name:
 
     class User
       find_by_autocomplete :name #User.find_by_autocomplete_name
@@ -72,10 +75,12 @@ Example for a pos with autocompleted user name:
     class Post
       has_one :user
       autocomplete_for(:user,:name) #auto_user_name= + auto_user_name
+      OR
+      autocomplete_for(:user,:name,:name=&gt;:creator) #auto_creator_name= + auto_creator_name (creator must a an User)
     end
 
 
-
-Copyright (c) 2008 Michael Grosser, released under the MIT license
-   
-Original: Copyright (c) 2007 David Heinemeier Hansson, released under the MIT license   
+Author
+======
+Copyright (c) 2008 Michael Grosser, released under the MIT license  
+Original: Copyright (c) 2007 David Heinemeier Hansson, released under the MIT license   
\ No newline at end of file</diff>
      <filename>README.markdown</filename>
    </modified>
    <modified>
      <filename>Rakefile</filename>
    </modified>
    <modified>
      <filename>example_js/javascripts/application.js</filename>
    </modified>
    <modified>
      <filename>example_js/javascripts/jquery.autocomplete.js</filename>
    </modified>
    <modified>
      <filename>example_js/javascripts/jquery.js</filename>
    </modified>
    <modified>
      <filename>example_js/stylesheets/jquery.autocomplete.css</filename>
    </modified>
    <modified>
      <filename>init.rb</filename>
    </modified>
    <modified>
      <diff>@@ -54,8 +54,9 @@ module Grosser
     # -&gt; Post has autocomplete_for('user','name')
     # -&gt; User has find_by_autocomplete('name')
     module RecordMethods
-      def autocomplete_for(object,method)
-        name = object.to_s.underscore
+      def autocomplete_for(object,method,options={})
+        name = options[:name] || object.to_s.underscore
+        name = name.to_s
         object = object.to_s.camelize.constantize
         
         #auto_user_name=</diff>
      <filename>lib/grosser/autocomplete.rb</filename>
    </modified>
    <modified>
      <filename>spec/setup_test_model.rb</filename>
    </modified>
    <modified>
      <filename>spec/simple_autocomplete_spec.rb</filename>
    </modified>
    <modified>
      <filename>spec/spec_helper.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>932b37ed79ad9e3acb4f6270bafacf6f3edcf251</id>
    </parent>
  </parents>
  <author>
    <name>grosser</name>
    <email>grosser.michael@gmail.com</email>
  </author>
  <url>http://github.com/grosser/simple_auto_complete/commit/3380a98906fbe31825e25b6a48a8cc58376a6f80</url>
  <id>3380a98906fbe31825e25b6a48a8cc58376a6f80</id>
  <committed-date>2009-01-20T01:43:28-08:00</committed-date>
  <authored-date>2009-01-20T01:43:28-08:00</authored-date>
  <message>new options + docs</message>
  <tree>59b65606b560ab90cd71a64e44d4ac1fd431a3e7</tree>
  <committer>
    <name>grosser</name>
    <email>grosser.michael@gmail.com</email>
  </committer>
</commit>
