1
ウェブ上で検索した後、私は問題を抱えて:rails3でauto_completeを使うには?
私はrails3を使用して、私は、次のコマンド
rails plugin install git://github.com/patshaughnessy/auto_complete.git
を行い、その後、私は私のレールサーバ
私index.html.erb
を再起動します。
<%= text_field_with_auto_complete :departement, :nom, {}, {:method => :get} %>
マイコン:
class AutocompController < ApplicationController
auto_complete_for :departement, :nom
end
ように私は、モデルを得た:
Noルートマッチ{::コントローラ=>」私は次のエラーを取得する
resources :autocomp, :collection => { :auto_complete_for_departement_nom => :get }
:
class CreateDepartements < ActiveRecord::Migration def self.up create_table :departements do |t| t.column :region_id, :integer t.column :num_dept, :string t.column :nom, :string end end def self.down drop_table :departements end end
私のroutes.rbをautocomp "、:action =>" auto_complete_for_departement_nom "}
なぜ動作しないのですか? rails3とauto_complete互換ですか? jQueryを使うべきですか?