To check the default select value tag!
Posted
by Small Wolf
on Stack Overflow
See other posts from Stack Overflow
or by Small Wolf
Published on 2010-06-07T05:04:46Z
Indexed on
2010/06/07
5:12 UTC
Read the original article
Hit count: 200
I have a question.Here is the code!
f.select(:departments,Department.all.collect{|c|[c.name,c.id]},{},:size=>10,:multiple => ture)
class Emergency
has many :departments
end
the html source like this:
<select id="emergency_departments" multiple="multiple" name="emergency[departments][]" size="10"><option value ="">""</option>....</select>
now I want to get the default selected tag , who can tell me how ?
© Stack Overflow or respective owner