Giter Site home page Giter Site logo

papercloud / active_admin_tokeninput Goto Github PK

View Code? Open in Web Editor NEW
2.0 18.0 3.0 100 KB

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

License: MIT License

Ruby 66.31% JavaScript 4.47% CSS 13.31% HTML 15.91%

active_admin_tokeninput's Introduction

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

active_admin_tokeninput's People

Contributors

dawilster avatar rustcomet avatar knightstick avatar tspacek avatar

Stargazers

Wade avatar  avatar

Watchers

Billy Chang avatar  avatar Mark Turner avatar Pawel Siedlak avatar James Cloos avatar John Servinis avatar Krystal Maria avatar Adam Ford avatar Jennifer Nordwall avatar Claire Taylor avatar Christian Bieniak avatar Ines Norman avatar  avatar  avatar  avatar  avatar  avatar Robo-Gladys avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.