I've created a patch that lets the "label_tag" and "label" helpers
accept blocks. I've found that it's quite common for labels to include
markup beyond text, and things get messy quickly. Consider
<%= f.label :terms, "<span>Accept #{link_to 'Terms', terms_path}</
span>" %>
versus
<% f.label :terms do %>
<span>Accept <%= link_to "Terms", terms_path %></span>
<% end %>
Ticket with patch/tests:
https://rails.lighthouseapp.com/projects/8994-ruby-on-rails/tickets/3645-let-label-helpers-accept-blocks
Stephen
--
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Core" 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/rubyonrails-core?hl=en.