From: Phrogz Date: 2007-05-09T07:00:10+09:00 Subject: Re: string substitution On May 8, 3:36 pm, Barry Abrams wrote: > I've got a block of html coming in from the database that looks like > this: > >
> #{@copy_1} >
Does it have to look like that? Could it instead look like this?
<%=@copy_1%>
If so, you want ERB. Roughly: require 'erb' template = #...stuff from the DB html = ERB.new( template ).result