Mustache/Haml for checking a checkbox

10 Jan 2013

I was trying to find away to elegant check/uncheck a checkbox in Mustache within Haml. And I think I have found an elegant solution. Here it is:

%input{ :type => "checkbox", ('{{#tax_deductible}}checked{{/tax_deductible}}') => true } Tax deductible?

Give it a kudos