Label Helpers


#1

Don’t know whether this has been discussed for the core, or if anyone
has seen a plugin.
Can anyone think of a reason why the form helpers don’t produce
corresponding labels?

Take the following example…

Name of
Local airport
<%= text_field ‘hotel_content’, ‘airportlocal’%>

The helper for text_field is compact but the necessary label code is
twice as long when most of the information is specific for the field.

Surely a syntax such as…
<%= text_field ‘hotel_content’, ‘airportlocal’, :label => “Name of
local airport”%>

would be much more DRY. You could always pass false to :label to omit
this.

Any thoughts?


#2

http://agilewebdevelopment.com/plugins/label :slight_smile:


Benjamin C.
http://www.bencurtis.com/
http://www.tesly.com/ – Collaborative test case management
http://www.agilewebdevelopment.com/ – Resources for the Rails community