Hi, All. Is it possible to use the text_field with an instance variable. Controller: def hoge @value = ''result'' end View: <%= text_field ''value'' %> It don''t work. Please help. -- Posted via http://www.ruby-forum.com/.
Junichi Goza wrote:> Is it possible to use the text_field with an instance variable. > > Controller: > def hoge > @value = ''result'' > end > > View: > <%= text_field ''value'' %>You can''t use text_field as that only works with objects. There is a text_field_tag helper method that should do the job though: <%= text_field_tag ''value'', @value %> -- Philip Ross http://tzinfo.rubyforge.org/ -- DST-aware timezone library for Ruby