<p>I have the following html.erb code that I'm looking to move to Haml:</p>

<pre><code>&lt;span class="&lt;%= item.dashboardstatus.cssclass %&gt;" &gt;&lt;%= item.dashboardstatus.status %&gt;&lt;/span&gt;
</code></pre>

<p>What it does is associate the CSS class of the currently assigned status to the span.</p>

<p>How is this done in Haml? I'm sure I'm missing something really simple.</p>

[{'answer_id': 6355, 'author': 'Christian Lescuyer', 'author_id': 341, 'author_profile': 'https://Stackoverflow.com/users/341', 'pm_score': 5, 'selected': True, 'text': '<p>Not sure. Maybe:</p>\n\n<pre><code>%span{:class =&gt; item.dashboardstatus.cssclass }= item.dashboardstatus.status\n</code></pre>\n'}, {'answer_id': 46319782, 'author': 'joeyk16', 'author_id': 4574914, 'author_profile': 'https://Stackoverflow.com/users/4574914', 'pm_score': 0, 'selected': False, 'text': '<p>This worked.</p>\n\n<p>Where ever the link is to the page do something like this</p>\n\n<pre><code>  %div{"data-turbolinks" =&gt; "false"}\n    = link_to \'Send payment\', new_payments_manager_path(sender_id: current_user.id, receiver_id: @collaboration.with(current_user).id, collaboration_id: params[:id]), class: \'button\'\n</code></pre>\n'}, {'answer_id': 59333930, 'author': 'Cristian Rennella', 'author_id': 7021493, 'author_profile': 'https://Stackoverflow.com/users/7021493', 'pm_score': 1, 'selected': False, 'text': '<p>You can do multiple conditional class selectors with array syntax:</p>\n\n<blockquote>\n  <p>%div{ class: [ ("active" if @thing.active?), ("highlight" if @thing.important?) ] }</p>\n</blockquote>\n'}]
['https://Stackoverflow.com/questions/6326', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/722/']