Skip to content

Instantly share code, notes, and snippets.

@abhijitsinha
Created Jul 19, 2013
Embed
What would you like to do?
Adding Tokeninput to ActiveAdmin
//= require active_admin/base
//= require jquery.tokeninput
$(document).ready(function(){
$('#token-input-mo').tokenInput('/method.json', {
crossDomain: false,
tokenLimit: 1,
minChars: 3,
hintText: "Type to search a field",
prePopulate: $('#token-input-mo').data('pre')
});
});
form do |f|
f.inputs 'School' do
f.input :school_id, :input_html => { :id => "token-input-mo"}
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment