Question on RHTML and puts


#1

In simple RHTML template a want to show values based on examples from
rails docs.
In first example ‘puts “Frodo”’ sends the value to console but not to
browser.

In second example I want avoid a huge of <%%> so I decided to put entire
cycle into one <%%> and print values to browser with ‘puts’. Still the
same results.

Can someone clarify, why the value is not sent to browser as
documentation claims?

Exam.1
Hi, Mr. <% puts “Frodo” %>

Exam. 2
<% for person in @people %>
puts ‘Name:’+person.name+’

<% end %>

I have Rails 1.1.1 on WinXP.

Thanks
David M.


#2

Forget it. I just found in docs that its not the way…

David

David M. wrote:

In simple RHTML template a want to show values based on examples from
rails docs.
In first example ‘puts “Frodo”’ sends the value to console but not to
browser.

In second example I want avoid a huge of <%%> so I decided to put entire
cycle into one <%%> and print values to browser with ‘puts’. Still the
same results.

Can someone clarify, why the value is not sent to browser as
documentation claims?

Exam.1
Hi, Mr. <% puts “Frodo” %>

Exam. 2
<% for person in @people %>
puts ‘Name:’+person.name+’

<% end %>

I have Rails 1.1.1 on WinXP.

Thanks
David M.