Hi, This is the controller: @thermo_detector = ThermoDetectorOrderLetter.find(@params[:id]) @thermo_detector[:number_of_element] = ''1 Element'' # this is ok @number_of_element_helper[''1element''] = ''bla'' # not ok This is the view: <%= radio_button(:thermo_detector, :number_of_element, ''1 Element'') %>1 Element <%= text_field(''number_of_element_helper'', ''1element'') %><br /> another radio button This line is source of my problem: @number_of_element_helper[''1element''] = ''bla'' It made me got this error: You have a nil object when you didn''t expect it! You might have expected an instance of Array. The error occured while evaluating nil.[] If I comment that, the code works: radio_button with value ''1 Element'' is checked, but the text field is empty. How do I send value from controller to this text field text_field(''number_of_element_helper'', ''1element'') where number_of_element_helper is not variable from model??? Thank you. --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---