On 27 February 2010 16:30, Dudebot <[email protected]> wrote: > OK, here's what I have in app/views/molds/show.html.erb: > > <tr><td><%= @mold.body.gsub( "\n", "<br />" ) %></td></tr> > > The controller finds @patient, and @patient.id = 2 > > If @mold.body = "The patients id is <%= @patient.id %>" > > Then the view displays > > The patients id is <%= @patient.id %> > > rather than > > The patients id is 2
I don't think many of the readers have actually worked out what you are asking. That is, if I am correct, have a string produced by a controller where the string includes the literal text <%= .. %> and have this interpolated somehow in the view. Perhaps if you were to explain why you are trying to achieve this someone may suggest a better way of solving the problem. Are the strings containing <%= .. %> stored in the db for example? Colin -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

