Topic: How to get a URL to submit form data?
I have a basic search form in my rails app that records each search that has been entered. I also want my users to be able to initiate a search with a url in the browser. E.g. http://www.example.com/searches?q=fooI've played around with the different routing options and the logic in my controller but I can't seem to get this form:
<%= form_for(@search) do |f| %> <div class="field"> <%= f.label :search %><br /> <%= f.text_field :search %> </div> <div class="actions"> <%= f.submit %> </div> <% end %>
...to initiate a POST action on the database and submit a new search via a url.
Last edited by ricburton (2011-08-22 06:40:57)