You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As a new developer, I had some issues getting this to work by following the documentation. However after trying some things and reading [Yoni Weisbrod](http://www.yoniweisbrod.com/autocomplete-magic-with-rails/)'s blog post, I was able to make the autocomplete work and implement a few useful features.
98
+
As a new developer, I had some issues getting this to work by following the documentation. However after trying some things and reading [Yoni Weisbrod](http://www.yoniweisbrod.com/autocomplete-magic-with-rails/)'s blog post, I was able to make the autocomplete work and implement a few useful features.
99
99
100
100
##Some implemented features
101
101
102
-
1. The css has been changed such that the results show up better against the box of suggestions. See `<app/assets/stylesheets/food.scss>` for details. I obtained this from a gist(forgive me I don't remember who the author is at the moment, please contact me if you do and I'll give credit). Upon mouseover/arrowkey presses, the selection will be highlighted.
102
+
1. The css has been changed such that the results show up better against the box of suggestions. See `<app/assets/stylesheets/food.scss>` for details. I obtained this from a gist(forgive me I don't remember who the author is at the moment, please contact me if you do and I'll give credit). Upon mouseover/arrowkey presses, the selection will be highlighted.
103
103
104
-
2. One Yoni's improvements, you can click on a suggested item to submit the search, instead of having to click on the submit button after clicking on the item. This is an example of how to hook onto the *railsAutocomplete.select* event.
104
+
2. One Yoni's improvements, you can click on a suggested item to submit the search, instead of having to click on the submit button after clicking on the item. This is an example of how to hook onto the *railsAutocomplete.select* event.
105
105
106
-
3. The autocomplete is implemented in the context of a search form with a simple scope search(see the food model and controller).
106
+
3. The autocomplete is implemented in the context of a search form with a simple scope search(see the food model and controller).
107
107
108
108
### Model Example
109
109
@@ -130,7 +130,7 @@ This will create an action _autocomplete_brand_name_ on your controller, don't f
130
130
resources :products do
131
131
get :autocomplete_brand_name, :on => :collection
132
132
end
133
-
133
+
134
134
Verify this path using `rake routes`, you will need it later for the **view** section.
135
135
136
136
### Options
@@ -194,27 +194,30 @@ Only the object's id and the column you are searching on will be returned in JSO
194
194
195
195
#### :hstore
196
196
197
-
Added option to support searching in hstore columns.
197
+
Added option to support searching in hstore columns.
198
198
199
-
Pass a hash with two keys: `:method` and `:key` with values: the hstore field name and the key of the hstore to search.
199
+
Pass a hash with two keys: `:method` and `:key` with values: the hstore field name and the key of the hstore to search.
Everyone on [this list](https://github.com/crowdint/rails3-jquery-autocomplete/contributors)
471
474
472
-
# About the Author
473
-
474
-
[Crowd Interactive](http://www.crowdint.com) is an American web design and development company that happens to work in Colima, Mexico.
475
-
We specialize in building and growing online retail stores. We don’t work with everyone – just companies we believe in. Call us today to see if there’s a fit.
0 commit comments