Skip to content

Instantly share code, notes, and snippets.

@bbonamin
Forked from emzeq/orders.rb
Created August 10, 2011 22:19
Show Gist options
  • Save bbonamin/1138431 to your computer and use it in GitHub Desktop.
Save bbonamin/1138431 to your computer and use it in GitHub Desktop.
rails3-jquery-autocomplete in ActiveAdmin
gem 'rails3-jquery-autocomplete', '0.9.0'
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