This project is archived and is in readonly mode.

#1741 ✓resolved
Tomasz Mazur

tag_options should properly handle arrays

Reported by Tomasz Mazur | January 12th, 2009 @ 10:27 PM | in 2.x

example:


['tom' => 'admin', 'jim' => 'user'].each_pair do |nick, role|
 <%= content_tag(:span, nick, :class => ["nickname", role]) %>
end

should render


<span class="role admin">tom</span>
<span class="role user">him</span>

instead of:


<span class="roleadmin">tom</span>
<span class="roleuser">him</span>

Everyone who makes lots of complicated views (with proper css classes usage) knows that using interpolation isn't quite handy....

Comments and changes to this ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>

Tags

Referenced by

Pages