spree / deface

Rails plugin that allows you to customize ERB views in a Rails application without editing the underlying view.
MIT License
520 stars 127 forks source link

Haml conditionals in line #154

Open dan-klasson opened 8 years ago

dan-klasson commented 8 years ago

This does not work with deface:

.hello{:style => (true ? 'color: green' : 'color: red;')}

The style element does not get displayed.

jalada commented 8 years ago

This bug made me want to smash things :( mainly because the behaviour of the bug is really weird; you just silently lose a bunch of your other element attributes.

For others encountering this; your best bet is to pull out the logic into a helper method to escape Deface.

tayateo commented 7 years ago

I also have this bug. Thank you.