Topic: string interpolation of a value coming from database

Hi, I have a url stored in the database with :

http:://www.#{foo}.com

I would like to get the value and interpolate it.

Using rails activerecord.

when I get it it shows like this

http:://www.\#{foo}.com

I tried assigning it to a local hoping that would force interpolation but no such luck.

Any ideas?

thanks
Joel

Re: string interpolation of a value coming from database

I figured it out, use

 eval mystring

another issue is when I load a attribute into db using a fixture it doesnt surround by double quotes, work around was ensure all double quotes in the string were escapted using \ and to manually surround with double quotes using:
wdqbaserul = "\"" + myentity.baseurl + "\""
theURL = eval wdqbaserul

im sure there is a better way but this works!