No release in over 3 years
Low commit activity in last 3 years
Use jQuery's autocomplete plugin with Rails 3 and globalize3 translated models.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 0.5.1
~> 1.3
>= 0
~> 2.8.0

Runtime

 Project Readme

globalize3-jquery-autocomplete

Build Status

Use JQuery autocomplete (via rails3-jquery-autocomplete) with globalize3 translated ActiveRecord models.

Internals: This gem patches the get_autocomplete_items method (provided by rails3-jquery-autocomplete) so it works with translated model columns.

Maintainance State of This Gem

Since we are not actively using this gem any more, further development is unlikely. If anyone wants to submit a PR, we will of course still try to review + merge.

Compatibility

rails3-jquery-autocomplete 1.0 and globalize3 0.3 are supported.

Installation

Add this line to your application's Gemfile:

gem 'globalize3-jquery-autocomplete'

And then execute:

$ bundle

Or install it yourself as:

$ gem install globalize3-jquery-autocomplete

Usage

Simply follow the documentation at globalize3 for how to translate your models and rails3-jquery-autocomplete for how to set up autocomplete.

You don't need any additional configuration. As soon as a column is translated, autocomplete will automatically be in context of the current locale.

Example (in your controller):

# query for matches in the current locale (given the 'name' column of your Brand model is translated):
autocomplete :brand, :name

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request