I have this haml
%table.form_upper{:style => "display:none;", :id => 'profile-info'}
%tr{:id => 'some-row'}
How do i do display none on this table if a condition is met like for example i know i can do this but i feel there has got to be an inline way of doing this
-if condtion
%table.form_upper{:id => 'profile-info'}
-else
%table.form_upper{:style => "display:none;", :id => 'profile-info'}
%tr{:id => 'some-row'}
You can do this:
%table.form_upper{:style => "display:#{condition ? 'none' : ''};", :id => 'profile-info'}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With