Generating markup in your rails helpers is a general practice in rails
and is used throughout all rails helpers. Normally you use content_tag
to generate markup. But often you will encounter situations, where
nested tags force you to write ugly helper code like the following
helper method from the rails library: