index.rhtml:

Search page

<%= render :partial => 'form' %> <%= render :partial => 'results' unless params[:searchterm].nil? %>
_form.rhtml: <%= start_form_tag(:action => 'index')%>
Search form <%= text_field_tag('searchterm', params[:searchterm])%><%= submit_tag('Search')%>
<%= end_form_tag %> _results.rhtml: <% if @pets.nil? %>

No results

<% else %>

<%= @pets.size -%> <%= @pets.size == 1 ? "Result" : "Results" %>

<% @i = 0 %> <% @pets.each { |pet| %> <% @i = 1-@i %> "> <% } %>
Map
<%= image_tag("/images/check_all.gif")%><%= image_tag("/images/uncheck_all.gif")%>
Name Description Price
<%= check_box(:map, pet[:id])%> <%= pet[:name] -%> <%= pet[:description] -%> <%= pet[:price] -%>
<% render :partial => 'mapitems'%>
<% end %> _mapitems.rhtml:

Map items

<%= start_form_tag(:action => 'map') %>
<%= text_field_tag('centerpoint') %>
<%= text_field_tag('area') %>
<% submit_tag('Map checked item(s)')%>
<%= end_form_tag %>