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? -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
> 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 -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
On Apr 7, 2008, at 17:53 , Mark Mr wrote:> 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?It should work. Did you restart the server? -- fxn --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
artificemm-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
2008-Apr-08 14:10 UTC
Re: Problem with text_field_with_auto_complete
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. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
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. :-) On Apr 8, 10:10 am, "artific...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org" <artific...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> 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.--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
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 :) -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---