Hi, I have a form that looks like this, and it works fine:
<% form_for :search_term, :url => { :action => :search} do |f|
%>
<%= f.text_field ‘search_term’ %>
<%= submit_tag ‘Search’ %>
<% end %>
I want to make a link that submits to the same action, but I when I
try, I get this error:
undefined method `stringify_keys!’ for “test search”:String
Here is my attempted link_to:
<%= link_to(truncate(recent_search.search_term, 40), {:controller =>
‘admin’, :action => ‘search’, :search_term =>
recent_search.search_term }, :method => :post ) %>
By the way, this search string displays just fine – but when I click
the link, I get that error.
Charlie