I have a class in a .html.erb view file that I want to give an id based on a variable.
I want to do something like this:
<ul id="#{store}">
Where store is a variable containing the string “store1”.
I want this to yield an ul like this: <ul id=store1>, but I get <ul id=#{store}> instead.
Do I need to create a helper to help facilitate this or is there some syntax I’m overlooking?
Try this: