Ajax and Rails Problem


#1

hi guys,

i am havin a problem displaying content of @wine from the search
action… i get no errors i only get &nbsp where the results is when i
examine the html plz help
i posted my code

John

def search
@wines = Wine.find(:all)
@wine_pages, @wines = paginate :wines

end

def searchaction

@search=request.raw_post
@wines = Wine.find(:all,:conditions=>[“name LIKE ?”,@search])

end

action


  <tr>
    <td>
      <p align="center"></p>

        <table align="CENTER" cellpadding="8">
          <tr>
            <td width="50%"><div align="left">Name: 

<%=wine.name%>

<% @search %>

<% @wines.each do |wine| %>


<% end %>
      <p align="center">&nbsp;</p>
      <p align="center">&nbsp;</p>          </td>
  </tr>
</table>
  </tr>
</table>
Enter The item you wish to search for
Search For : <%= text_field_tag :search %> <%= observe_field(:search, :frequency =>0.5,:url => { :action => :searchaction }, :update => :"results") %>
<% if (@wines.empty?) then %>

No Item was found matching your cirteria

Search Again..?

<% else %> <% @wines.each do |wine| %>

 

Name: <%=wine.name%>
<% end %> <% end %>

 

 

<%= pagination_links(@wine_pages) %>