ASP's Response.Write for ERb
|
|
Back with good ‘ol ASP, you could do something like this:
but with ERb, I seem to have to do this:
is there any way to do something like this with ERb:
puts doesn’t seem to do the trick. |
|
|
You could do something like <% for animal in barn; concat(animal.name, binding); end %> But not recommended. What you’ve got in your second example is the preferred approach. Kinda nice actually. There’s a clear distinction between evaluated Ruby code and what you’re going to output to the view. |