I have the following action in my controller
def search
@query = params[:query] || ''
unless @query.blank?
@results = Residence.find_by_contents @query
end
end
In my View I have
<div id="search-box">
<%= form_tag( { :action => 'search'}, :method => 'get')%>
<input type="text" id="search-text" name="query" value="<%= h @query
%>" />
<%= submit_tag 'search' %>
<%= end_form_tag %>
</div>
<% if @results -%>
<a name="results"></a>
...
<% end %>
When the user clicks "search" the generated url is eg:
http://localhost:3000/?query=10013&commit=search
How would I append a #results to this url so that the browser window
"jumps" to the result output part of the page ? I apologise if this is
not a ferret-specific question.
Thank you for your help,
Chris
--
Posted via http://www.ruby-forum.com/.
_______________________________________________
Ferret-talk mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/ferret-talk