i am using one collection select in my application,
and i am trying to set the value which i am selected,but i
unable to fixed it.It always refer to first value.Here is my
code,what is wrong in this code,
and what is the appropriate code.please help.

 <%= collection_select(:employeedetails, :EmpNo,

@emprecord,:EmpNo,:Employee_Name,{:selected=>Employee_Name},{:class =>
and in controller::
@emprecord=EmployeeDetails.find_by_sql(“select * from

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs