I need a form development with the following requirements.. I have the employee form he has a dependent or may not so i took the option buttons yes/no based on that the data to be stored in the database either ''y''/''n''. i wrote the java script event for the onclick event of the buttons(YES and NO) in that i am not getting how to set the field to the @employee.dependent in the controller if i do @employee.dependent=''y'' it is working fine before the @employee.save i need that action according to the option buttons in the _form.rhtml.. i tried by creating the class variable @depend it is declared in my model in the employee class and is accessed form the .rhtml <%@employee.depend=''y'' %> but it is not working.. or even i tried with the instance variable @depend in my controller and in the .rhtml i tried as <%= @depend=''y'' %> i wrote the line @employee.dependent = @depend before the statement @employee.save even it is also not working can anyone help me regarding this.. -- 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-/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?hl=en -~----------~----~----~----~------~----~------~--~---