Skip to content

Instantly share code, notes, and snippets.

@andrewpthorp
Created September 7, 2011 15:57
Show Gist options
  • Save andrewpthorp/1200961 to your computer and use it in GitHub Desktop.
Save andrewpthorp/1200961 to your computer and use it in GitHub Desktop.
Nesting tags
emails = []
recipient.contact.emails.each do |email|
emails << content_tag(:li) do
form.radio_button(:email, email.address, :class => "radio-button")
form.label(:email, nil, :value => email.address) do
"<span>#{email.location}</span>"
end
end
end
emails.join
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment