Can anyone help me out why im getting this error: "undefined method `text_field_with_auto_complete'' for #<ActionView::Base:0x2472460>" I been trying to follow a tutorial here => http://ricardo.pacheco.name/blog/articles/2006/09/17/using-autocomplete-with-belongs_to-fields-part-ii and cant cant anything working because of this error. Im using Raisl 2.0.2 VIEW <% form_tag :action => ''create'' do %> <%= text_field_with_auto_complete(''suburb'', ''name'', { :size => 40 }, { :after_update_element => ''auto_complete_on_select'' }) %> ....(more fields).... <%= submit_tag "Create" %> <% end %> CONTROLLER def auto_complete_for_suburb_name find_options = { :conditions => [ "LOWER(name) LIKE ?", params[:suburb] [:name].downcase + ''%'' ], :order => "name ASC", :limit => 10 } @suburbs = Suburb.find(:all,find_options) render :inline => "<%= indexed_auto_complete_result @suburbs, ''business_suburb_id'', ''name'', ''id'' %>" end any ideas? --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Chubbs wrote:> Can anyone help me out why im getting this error: > "undefined method `text_field_with_auto_complete'' for > #<ActionView::Base:0x2472460>" > > I been trying to follow a tutorial here => > http://ricardo.pacheco.name/blog/articles/2006/09/17/using-autocomplete-with-belongs_to-fields-part-ii > > and cant cant anything working because of this error. > > Im using Raisl 2.0.2 > > VIEW > <% form_tag :action => ''create'' do %> > <%= text_field_with_auto_complete(''suburb'', ''name'', { :size => > 40 }, { :after_update_element => ''auto_complete_on_select'' }) %> > ....(more fields).... > <%= submit_tag "Create" %> > <% end %> > > CONTROLLER > def auto_complete_for_suburb_name > find_options = { > :conditions => [ "LOWER(name) LIKE ?", params[:suburb] > [:name].downcase + ''%'' ], > :order => "name ASC", > :limit => 10 > } > @suburbs = Suburb.find(:all,find_options) > render :inline => "<%= indexed_auto_complete_result @suburbs, > ''business_suburb_id'', ''name'', ''id'' %>" > end > > > > any ideas? > > > > >Rails 2.0 no longer comes with autocomplete. You can get it back here: http://svn.rubyonrails.org/rails/plugins/auto_complete/ --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
ahh ok cool thanks for that. On Dec 30, 4:18 pm, Ryan Bigg <radarliste...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Chubbs wrote: > > Can anyone help me out why im getting this error: > > "undefined method `text_field_with_auto_complete'' for > > #<ActionView::Base:0x2472460>" > > > I been trying to follow a tutorial here => > >http://ricardo.pacheco.name/blog/articles/2006/09/17/using-autocomple... > > > and cant cant anything working because of this error. > > > Im using Raisl 2.0.2 > > > VIEW > > <% form_tag :action => ''create'' do %> > > <%= text_field_with_auto_complete(''suburb'', ''name'', { :size => > > 40 }, { :after_update_element => ''auto_complete_on_select'' }) %> > > ....(more fields).... > > <%= submit_tag "Create" %> > > <% end %> > > > CONTROLLER > > def auto_complete_for_suburb_name > > find_options = { > > :conditions => [ "LOWER(name) LIKE ?", params[:suburb] > > [:name].downcase + ''%'' ], > > :order => "name ASC", > > :limit => 10 > > } > > @suburbs = Suburb.find(:all,find_options) > > render :inline => "<%= indexed_auto_complete_result @suburbs, > > ''business_suburb_id'', ''name'', ''id'' %>" > > end > > > any ideas? > > Rails 2.0 no longer comes with autocomplete. > > You can get it back here:http://svn.rubyonrails.org/rails/plugins/auto_complete/--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---