Skip to content

Instantly share code, notes, and snippets.

@emzeq
Created August 10, 2011 16:32
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save emzeq/1137340 to your computer and use it in GitHub Desktop.
Save emzeq/1137340 to your computer and use it in GitHub Desktop.
rails3-jquery-autocomplete in ActiveAdmin
form do |f|
f.form_buffers.last << f.autocompleted_input(:product_name, url: autocomplete_product_name_orders_path, label: 'Product')
end
class OrdersController < ApplicationController
autocomplete :product, :name, full: true
end
resources :orders do
get :autocomplete_product_name, on: :collection
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment