Hi,
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 =>
"abc"})%>
and in controller::
@emprecord=EmployeeDetails.find_by_sql("select * from
EmployeeDetails")
--
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
-~----------~----~----~----~------~----~------~--~---