Skip to content

asecondwill/awesomplete

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

Gem Version

Getting started

  1. Add to Gemfile and bundle install.

    gem 'awesomplete'
  2. Add to app/assets/javascripts/application.js:

    //=require awesomplete
  3. 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

  1. Write update version task.

  2. More options

Kiselenko Roman

This project rocks and uses MIT-LICENSE.

About

Awesomplete for Rails applications.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 53.4%
  • Ruby 32.8%
  • CSS 13.8%