Hello,
The following view:
<%= start_form_tag %>
Enter term to find
<p>
<%= text_field_tag :name, params[:name] %>
</p>
<%= link_to "Find", { :action => 'find_term'} %>
<%= end_form_tag %>
does not appear to pass back the value of :name to the action:
def find_term
term = Term.find_by_name(params[:name])
if term
redirect_to :controller => “term”, :action => “show”, :id =>
term.id
else
flash[:notice] = “Unable to find the term: #{term}”
end
end
The notice printed is:
Unable to find the term:
How do I pass back the value of the inputted variable to the controller?
'elp!
gk