Awesomplete For Rails

This is small gem add to your Rails app Awesomplete autocomplete.

This is the working version.

# Developed and tested on:
Ruby 2.1.0
Rails ~> 4.0.0

Gem Version

Getting started

  1. Add to Gemfile and bundle install.
   gem 'awesomplete'
  1. Add to app/assets/javascripts/application.js:
   //=require awesomplete
  1. Add to app/assets/stylesheets/application.css
   *= require awesomplete

Restart server. That's it.

Usage

Now you can write inputs with awesomplete autocomplete!

Check it out.

in controller:

def index
  @collection = ['One', 'Two', 'Three', 'Four'].join(',')
end

in views:

<%= text_field_tag :something, nil, class: 'awesomplete', data: { list: @collection } %>

Configure module

You can configurate this autocomplete by two ways:

  1. In data- options in views:
  #TODO
  1. In javascripts initializer (e.g. app/assets/javascripts/some_script.js):
  #TODO

TODO

  1. Write update version task.

  2. Write full helper method like link_to or assets_path something like awesomplete.

Kiselenko Roman

This project rocks and uses MIT-LICENSE.