# Text\_field\_with\_auto\_complete undefined method error

**URL:** <https://www.ruby-forum.com/t/text-field-with-auto-complete-undefined-method-error/124552>\
**Category:** Rails\
**Created:** [December 30, 2007, 5:41am UTC](https://www.ruby-forum.com/t/text-field-with-auto-complete-undefined-method-error/124552 "2007-12-30T05:41:49Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Chubbs](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/47e85d/32.png) [@Chubbs](https://www.ruby-forum.com/u/Chubbs)\
**Post date:** [December 30, 2007, 5:41am UTC](https://www.ruby-forum.com/t/text-field-with-auto-complete-undefined-method-error/124552/1 "2007-12-30T05:41:49Z")

</div>

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](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?

---

<div class="post-metadata">

**Author:** ![Chubbs](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/47e85d/32.png) [@Chubbs](https://www.ruby-forum.com/u/Chubbs)\
**Post date:** [December 30, 2007, 6:19am UTC](https://www.ruby-forum.com/t/text-field-with-auto-complete-undefined-method-error/124552/2 "2007-12-30T06:19:12Z")

</div>

Chubbs wrote:

> ```
> find_options = {
> 
> ```
> 
> any ideas?
> 
> >

Rails 2.0 no longer comes with autocomplete.

You can get it back here:  
[http://svn.rubyonrails.org/rails/plugins/auto\_complete/](http://svn.rubyonrails.org/rails/plugins/auto_complete/)

---

<div class="post-metadata">

**Author:** ![Chubbs](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/47e85d/32.png) [@Chubbs](https://www.ruby-forum.com/u/Chubbs)\
**Post date:** [December 30, 2007, 7:02am UTC](https://www.ruby-forum.com/t/text-field-with-auto-complete-undefined-method-error/124552/3 "2007-12-30T07:02:26Z")

</div>

ahh ok cool thanks for that.
