hi this is my htnl
<%= javascript_include_tag :defaults %>
<%= form_tag nil, { :id => 'search_form' } %>
<%= text_field 'recipe', 'name' %>
<%= end_form_tag %>
<%= observe_form :search_form, :frequency => 0.5,
:update => ‘recipe’,
:url => { :action => ‘search_ajax’ } %>
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
Karthik.k
Mobile - +91-9894991640
<% 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
–
Karthik.k
Mobile - +91-9894991640
Hi!
You can find documentation for PrototypeHelper with good examples
here:
http://api.rubyonrails.org/classes/ActionView/Helpers/PrototypeHelper.html
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 caughtNoMethodError 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:
13:
14: <%= observe_field(:search_name,:frequency =>
0.25,:ulr=>{:action=>‘search_ajax’},:with=>“prefix”,:update=>:room)%>
15:
16:
please help
I am very new to ruby on rails
–
Karthik.k
Mobile - +91-9894991640
Also, always check your code, maybe even get your hands on a good
development environment:
<%= observe_field(:search_name,:frequency =>
0.25,:ulr=>{:action=>‘search_ajax’},:with=>“prefix”,:update=>:room)%>
What’s an “ulr”? ![:slight_smile: :slight_smile:](/images/emoji/apple/slight_smile.png?v=6)
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
–
Karthik.k
Mobile - +91-9894991640