I have a string in a db that contains a local variable reference and I want Ruby to parse and replace it.
For example, the string in the db is "Hello #{classname.name}"
and it is stored in classname.description
and my code reads:
<%=h @classname.description %>
Put that just prints the exact value from the db:
Hello #{name}
and not the (assume classname.name
is Bob):
Hello Bob
How do I get Ruby to parse the string from the db?