text_field value doubt

Zeeshan Nazim
2010-07-09T13:10:43Z

<%= f.text_field :item, :value => Date.today %>
above code displays todays date in item text field.

I want to display the parameter thr(search string)..somthin lik
<%= f.text_field :item, :value => params[:search_string] %>
but above code does not work.

Textfield is blank and no param value is printed. why? plz help.

Btw the search_string(param) was entered thru a textField that was in a
different view page. do we have to pass it to this ''creteForm''
view
page. if yes,how to do it?
--
Posted via http://www.ruby-forum.com/.

--
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
For more options, visit this group at