Skip to content

Instantly share code, notes, and snippets.

@ColPanic
Created April 12, 2010 22:44
Show Gist options
  • Save ColPanic/364087 to your computer and use it in GitHub Desktop.
Save ColPanic/364087 to your computer and use it in GitHub Desktop.
<p>
<form name="sform" action="" style="display:inline;">
<label for="item_name">Filter on item name : </label>
<%= text_field_tag("query", params['query'], :size => 10 ) %>
</form>
<%= image_tag("spinner.gif",
:align => "absmiddle",
:border => 0,
:id => "spinner",
:style =>"display: none;" ) %>
</p>
<%= observe_field 'query', :frequency => 2,:update => 'table',
:before => "Element.show('spinner')",
:success => "Element.hide('spinner')",
:url => {:action => 'search'},
:with => 'query' %>
<div id="table">
</div>
Gives error:
NoMethodError in Accounts#index
Showing /Users/toddallen/scooter/app/views/accounts/index.html.erb where line #14 raised:
undefined method `observe_field' for #<#<Class:0x2eee088>:0x2eed23c>
Extracted source (around line #14):
11: :style =>"display: none;" ) %>
12: </p>
13:
14: <%= observe_field 'query', :frequency => 2,:update => 'table',
15: :before => "Element.show('spinner')",
16: :success => "Element.hide('spinner')",
17: :url => {:action => 'search'},
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment