Still doesn't work.... On Feb 27, 11:06 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > Hello, > > Try with :states instead of the singular :state. > > On 27 fév, 03:27, "Nick" <[EMAIL PROTECTED]> wrote: > > > Dear all, > > > I'm trying to get a field to autocomplete using auto_complete_for. I > > have a database table "states" containing the data in a field name > > "name". However it just does not show the list. Can anybody help ? I'm > > pretty new to rails. Here is my code: > > > /state/index.rhtml: > > > <script src="javascripts/prototype.js" type="text/javascript"></ > > script> > > <script src="javascripts/scriptaculous.js" type="text/javascript"></ > > script> > > > Just a little test: > > <%= text_field_with_auto_complete :state, :name %> > > > /controller/state_controller.rb > > class StateController < ApplicationController > > auto_complete_for :state, :name > > end > > > /db/schema.rb > > ActiveRecord::Schema.define(:version => 0) do > > create_table "states", :force => true do |t| > > t.column "name", :string, :limit => 20 > > end > > end > > > Thanks, > > > Nick,
--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
