Skip to content

Instantly share code, notes, and snippets.

@Fivell
Forked from emzeq/orders.rb
Created September 9, 2012 07:47
Show Gist options
  • Save Fivell/3683243 to your computer and use it in GitHub Desktop.
Save Fivell/3683243 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