On Sat, 2010-02-27 at 07:43 -0800, Dudebot wrote:
> Thanks, Craig--I think my example was too terse.  What I'm trying to
> do is to pass a block of text to a view which may contain multiple
> references to external models, and I'd like to interpolate those
> references.
> 
> So, for example, if @thing.body = " This is the id of foo: <%= @foo.id
> %> and this is its body: <%= @foo.body %> "
> 
> If @foo.id = 2 and @foo.body = "Norman", I'd like in the view
> whatever.html.erb to have
> 
> <%= @thing.body %>
> 
> display
> 
> This is the id of foo: 2 and this is its body: Norman
> 
> Is there a way to do that?  I also tried #{ ... } and am still getting
> the literal rather than the interpolation.
----
try actual code examples

Craig


-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

-- 
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.

Reply via email to