11175
(-- --)
August 5, 2008, 4:25pm
1
<%= text_field_tag :search, params[:search], :id=>"search_field",
:value=>params[:search] %>
I found this, and I'm just wondering what the first parameter, :search,
is exactly. And does the second parameter mean params[:search] =
text_field_tag's value?
Thanks!
<%= text_field_tag :search, params[:search], :id=>"search_field",
:value=>params[:search] %>
I found this, and I'm just wondering what the first parameter, :search
The first parameter is the name of the input element
is exactly. And does the second parameter mean params[:search] =
text_field_tag's value?
The second parameter means the text field's initial contents will be
params[:search]