On Sat, Apr 12, 2008 at 9:13 PM, pgega <[EMAIL PROTECTED]> wrote:
>
> Hi there,
>
> I need to set SELECTED inside <option> tag.
# in the controller:
@references = %w(Google Yahoo! MSN Ask)
# view:
%select{:name => "reference"}
- for reference in @references
%option{ :selected => reference == @page.reference}= h reference
And that's it. But you should really look into Rails helpers for option
tags:
http://api.rubyonrails.org
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Haml" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/haml?hl=en
-~----------~----~----~----~------~----~------~--~---