Let's say I've got AR class:
.........
store :skin_properties, accessors: [
:background_color,
:font_size,
:font_family,
:color
]
.........
Which save values in this way:
{"background_color"=>"#f2f2f2", "font_size"=>"20px", "font_family"=>"Verdana", "color"=>"#000000"}
How can I insert it in edit.haml file as inline css?
I tried something like this, but it's not working ...
:sass
body
[email protected]_properties.each_with_index do |(k,v)|
"#{k.gsub("_","-")}:#{v};"