Problem with text_field_with_auto_complete

I Just looked into how to use text_field_with_auto_complete, but for
some reason it wont work on my page. It gives me this error as an
undefined method.

undefined method `text_field_with_auto_complete’ for
#ActionView::Base:0x250f42c

I have javascript_include_tag :defaults in my layout, I have the latest
version of scriptaculous, i even did script/plugin install auto_complete
in my terminal. I tried using another scriptaculous method and it worked
just fine. Anyone have an idea as to why this one wont work?

undefined method `text_field_with_auto_complete’ for
#ActionView::Base:0x250f42c

The problem is not in your javascript. The problem is the View doesn’t
know that method. Check the auto_complete example again your probably
missing a line like:

auto_complete_for :post, :title

On Apr 7, 2008, at 17:53 , Mark Mr wrote:

auto_complete
in my terminal. I tried using another scriptaculous method and it
worked
just fine. Anyone have an idea as to why this one wont work?

It should work. Did you restart the server?

– fxn

Found this:

http://trix.pl/blog/ruby-on-rails/auto-complete-for-rails-2-0-tutorial

Hope it helps, haven’t tried it, but looks fairly simple… also take
a look at the comments.

Cheers.

It is fairly simple to use. The problem, most likely, is that
autocomplete was pulled out of the core and placed in a plugin.
autocomplete does not autocomplete itself. :slight_smile:

On Apr 8, 10:10 am, “[email protected][email protected]

Yeah apparently i forgot to restart the server and thats why. I then had
another problem with permission which i solved by using

protect_from_forgery :only => [:create, :update, :destroy]

Now it seems to be working ok :slight_smile:

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs