README.markdown in rails3-jquery-autocomplete-0.0.2 vs README.markdown in rails3-jquery-autocomplete-0.0.3
- old
+ new
@@ -17,12 +17,16 @@
## Installing
Include the gem on your Gemfile
- gem 'rails3-jquery-autocomplete'
-
+ gem 'rails3-jquery-autocomplete', '>= 0.0.3', :require => 'autocomplete'
+
+Install it
+
+ bundle install
+
And then, run the generator
rails generate autocomplete
## Usage
@@ -45,9 +49,20 @@
### View
On your view, all you have to do is include the attribute autocomplete on the text field
using the url to the autocomplete action as the value.
+ form_for @product do |f|
+ f.text_field :brand_name, :autocomplete => autocomplete_brand_name_products_path
+ end
- f.text_field :brand_name, :autocomplete => autocomplete_brand_name_products_path
+This will generate an HTML tag that looks like:
-That's it!
+ <input type="text" autocomplete="products/autocomplete_brand_name">
+
+Now your autocomplete JS code is unobtrusive, Rails 3 style.
+
+And... That's it!
+
+## TODO
+
+Tests
\ No newline at end of file