November 2011
1 post
4 tags
Quick and dirty search in Rails
Ever wondered how to quick have a search function in your rails app?
Here is a super quick and maybe a lil dirty way to achieve so.
First step:
The view
<p><%= form_tag("/searches", :method => "get") do %>
<%= text_field_tag :keywords, params[:keywords] %> </p>
<p> <%= submit_tag("Search") %>
<% end %>
...