9elements/haml-coffee — Issue #20: Conditional HTML attributes
Author: olivernn
Created: 2012-01-23 15:30:18+00:00
State: open

I'm having some trouble generating option tags with the selected attribute set, currently I have this:

- for title in ['Mr', 'Mrs', 'Ms', 'Miss']
%option{value: title selected: @title == title}= title

However the markup that it produces is this:

Mr

Mrs

Ms

Miss

`@title` is 'Mr' for the above example.

Am I doing this wrong, is there a better approach to achieve the same thing?

Currently I am using haml-coffee-assets gem version 0.6.1, as this is the latest version I assume it is using the latest haml-coffee.