Skip to content

Adds a 'has_many_token' form field type to Active Admin to avoid huge select fields, using jQuery tokeninput

License

MIT, MIT licenses found

Licenses found

MIT
LICENSE
MIT
MIT-LICENSE
Notifications You must be signed in to change notification settings

MBSSearch/active_admin_tokeninput

This branch is up to date with Papercloud/active_admin_tokeninput:master.

Folders and files

NameName
Last commit message
Last commit date
May 12, 2015
Dec 10, 2013
Apr 20, 2015
Dec 10, 2013
Apr 20, 2015
Dec 9, 2013
Dec 6, 2013
Mar 30, 2015
Dec 9, 2013
Dec 6, 2013
Mar 13, 2014
Dec 6, 2013
Dec 10, 2013
Dec 11, 2013
Dec 11, 2013
Jun 18, 2014

Repository files navigation

active_admin_tokeninput

Credit goes to James Smith (http://loopj.com) for the jquery tokenInput plugin

Installation

gem 'active_admin_tokeninput'

Add this line to the active_admin model file, which sets up the autocomplete route.

ActiveAdmin.register Post do
	tag_autocomplete
end

Add this to your activeadmin form if it's a has_many reationship

f.input :posts, as: :has_many_token

Otherwise if it's a belongs_to

f.input :author, as: :belongs_to_token

If you need to define your own autocomplete path

f.input :posts, as: :belongs_to_token, autocomplete_path: autocomplete_admin_author_posts_path

About

Adds a 'has_many_token' form field type to Active Admin to avoid huge select fields, using jQuery tokeninput

Resources

License

MIT, MIT licenses found

Licenses found

MIT
LICENSE
MIT
MIT-LICENSE

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Ruby 63.6%
  • HTML 17.2%
  • SCSS 12.2%
  • JavaScript 4.8%
  • CSS 2.2%