I’m sure he knows what <%= expression %> does since he mentioned it
first
I don’t have an answer Wes, but I’ve wished for the same thing.
Sometimes it is just aesthetically nicer to use something like
out.write() in a <% %> code block. Perhaps it affects people who use
color coded editors more…
What is the method of “writing to the output stream” in RoR? Basically,
what is the equivalent of out.write()?
I have an if then statement that I want to put around a call to
Usually, when I’ve wanted to do that, I realized that the view was
actually
getting too complicated, and the code really belonged in either the
model
or a helper… I’m not saying that’s always the case, but it’s something
to
consider.
<% if %>
<%= stuff %>
<% else %>
<%= other stuff %>
<% end %>
especially since we know there must be some kind of handle to the
output stream anyway.
Actually, maybe not at the Ruby level - I don’t understand the IO model
for Ruby yet, so I can’t say. But it seems like there should be some
suitable abstraction, no?
Anyhow, cheese is ok for now
Wes
Dav Y. wrote:
I’m sure he knows what <%= expression %> does since he mentioned it
first
I don’t have an answer Wes, but I’ve wished for the same thing.
Sometimes it is just aesthetically nicer to use something like
out.write() in a <% %> code block. Perhaps it affects people who use
color coded editors more…