there is a line displayed within <pre>
<%= h @stories.inspect %>
and the output was too long, so i changed it to
<%= #h @stories.inspect %>
<% @stories.each do |s| %>
<%= h s.inspect %>
<% end %>
(commenting out the first line). now the code will fail to compile...
saying
compile error
/Users/winterheat/ror/shov2/app/views/stories/index.html.erb:13: syntax
error, unexpected kENSURE, expecting ')'
/Users/winterheat/ror/shov2/app/views/stories/index.html.erb:15: syntax
error, unexpected kEND, expecting ')'
and if i remove that commented line altogether, the code will work. i
thought in some book, it is said that you can comment out some code in
ERB like that?
Update: funny if i change it to
<% #h @stories.inspect %>
then it will compile fine... so the displaying of result tag <%= %>
doesn't like comments, it seems.
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
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 rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---