Doubt in nil object with ajax

hi this is my htnl

<html>
<head>
<%= javascript_include_tag :defaults %>
</head>
  <body>
<%= form_tag nil, { :id => 'search_form' } %>

<%= text_field 'recipe', 'name' %>
<%= end_form_tag %>

<div id="recipe">
</div>

<%= observe_form :search_form, :frequency => 0.5,
     :update => 'recipe',

     :url => { :action => 'search_ajax' } %>
  </body>
</html>

below is the error i am getting
Action Controller: Exception caught
Showing room/search.html.erb where line #9 raised:

You have a nil object when you didn't expect it!
You might have expected an instance of ActiveRecord::Base.
The error occurred while evaluating nil.[]

any idea

<% form_tag nil, :id => 'search_form' do %>
<%= text_field 'recipe', 'name' %>
<% end %>

works fine

hi Rakoth

Thank you

Is there any good tutorial where i can search for text using ajax ruby on rails
I am using rails 2.3.2

hi Rakoth

<%= form_tag :acton=>‘dummy’%>
<%= text_field_tag :search_name%>
<%= form_tag%>



<%= observe_field(:search_name,:frequency => 0.25,:ulr=>{:action=>‘search_ajax’},:with=>“prefix”,:update=>:room)%>

above is my page

i get error
in observe_field as

Action Controller: Exception caught

NoMethodError in Room#search

Showing room/search.html.erb where line #14 raised:

You have a nil object when you didn't expect it!
You might have expected an instance of ActiveRecord::Base.
The error occurred while evaluating nil.[]

Extracted source (around line #14):

11: <%= form_tag%>
12: <div id="room">
13: </div>
14: <%= observe_field(:search_name,:frequency => 0.25,:ulr=>{:action=>'search_ajax'},:with=>"prefix",:update=>:room)%>

15: </body>
16: </html>

please help

I am very new to ruby on rails

Hi!

You can find documentation for PrototypeHelper with good examples
here:
http://api.rubyonrails.org/classes/ActionView/Helpers/PrototypeHelper.html

Also, always check your code, maybe even get your hands on a good
development environment:

    &lt;%= observe\_field\(:search\_name,:frequency =&gt;

0.25,:ulr=>{:action=>'search_ajax'},:with=>"prefix",:update=>:room)%>

What's an "ulr"? :slight_smile:

hi jhaagmans

thank you
i found myself
I am very new to this ruby on rails, but i need support from you experts

Thank you