Ajax and Rails Problem

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


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


def searchaction

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



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

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


<% @search %>

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

<% end %>
      <p align="center">&nbsp;</p>
      <p align="center">&nbsp;</p>          </td>
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) %>

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs