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
Getting started
-
Add to
Gemfile
andbundle install
.gem 'awesomplete'
-
Add to
app/assets/javascripts/application.js
://=require awesomplete
-
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.
This example used slim templating engine.
.ui.fluid.form
.two.fields
= form_for(:post, url: posts_path) do |f|
= f.awesomplete_field(:name, collection: ['five', 'six', 'seven'])
= submit_tag "Add Post"
= awesomplete_field(:other, collection: ['red', 'green', 'blue'])
= simple_form_for(:post, url: posts_path, remote: true, method: :post) do |i|
.field
= i.awesomplete_field(:title, collection: ['one', 'two', 'three'])
.field
Configure
You can configurate this autocomplete:
#TODO
TODO
-
Write update version task.
-
More options
Kiselenko Roman
This project rocks and uses MIT-LICENSE.