Select_tag selected value?


Administrative control panel which lists users and allows mass updates
of attributes from a single screen.

My code:
<%= select_tag(“person[#{}][role]”, 'user

admin', options = {:selected => person.role}) %>

Rendered HTML:

user admin

“admin” isn’t selected when it should be! all people have “user”
selected regardless of role defined in the DB. Any ideas?


there’s something you perhaps need!