<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: ERB block comments in RHTML templates using Ruby on Rails</title>
	<atom:link href="http://blog.localkinegrinds.com/2008/05/02/erb-block-comments-in-rhtml-templates-using-ruby-on-rails/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.localkinegrinds.com/2008/05/02/erb-block-comments-in-rhtml-templates-using-ruby-on-rails/</link>
	<description>Everything you&#039;ve ever thought, but never had the balls to say.</description>
	<lastBuildDate>Tue, 22 Nov 2011 07:17:58 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Commenting Out ERb code in Rails (*.html.erb) &#124; Ruby on Rails Notes</title>
		<link>http://blog.localkinegrinds.com/2008/05/02/erb-block-comments-in-rhtml-templates-using-ruby-on-rails/comment-page-1/#comment-30006</link>
		<dc:creator>Commenting Out ERb code in Rails (*.html.erb) &#124; Ruby on Rails Notes</dc:creator>
		<pubDate>Mon, 20 Apr 2009 12:51:24 +0000</pubDate>
		<guid isPermaLink="false">http://blog.localkinegrinds.com/?p=169#comment-30006</guid>
		<description>[...] &lt;melvinram&gt; nat2610: http://blog.localkinegrinds.com/2008/05/02/erb-block-comments-in-rhtml-templates-using-ruby-on-rails... [...]</description>
		<content:encoded><![CDATA[<p>[...] &lt;melvinram&gt; nat2610: <a href="http://blog.localkinegrinds.com/2008/05/02/erb-block-comments-in-rhtml-templates-using-ruby-on-rails.." rel="nofollow">http://blog.localkinegrinds.com/2008/05/02/erb-block-comments-in-rhtml-templates-using-ruby-on-rails..</a>. [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Charlie</title>
		<link>http://blog.localkinegrinds.com/2008/05/02/erb-block-comments-in-rhtml-templates-using-ruby-on-rails/comment-page-1/#comment-29827</link>
		<dc:creator>Charlie</dc:creator>
		<pubDate>Sat, 03 Jan 2009 18:38:14 +0000</pubDate>
		<guid isPermaLink="false">http://blog.localkinegrinds.com/?p=169#comment-29827</guid>
		<description>Just struggled with this after upgrading to Ruby 1.8.7 and Rails 2.2.2.

Here is a relevant portion from the inline documentation for ERB:

&#124; ERB recognizes certain tags in the provided template and converts them based on the rules below:
&#124; 
&#124;   
&#124;   
&#124;   
&#124;   % a line of Ruby code -- treated as  (optional -- see ERB.new)
&#124;   %% replaced with % if first thing on a line and % processing is used
&#124;    -- replace with  respectively

So, contrary to some suggestions (http://www.ruby-forum.com/topic/154835#693739), comments ARE allowed in ERB, but it seems to be safe only to do so when the whole embedded expression is a comment, i.e.:





If your &#039;bad comments&#039; are consistent in their usage of whitespace around the hash mark, then it ought to be easy to do a grep search-and-replace to change all your bad comments to look like this, which WILL work in Ruby 1.8.7:

</description>
		<content:encoded><![CDATA[<p>Just struggled with this after upgrading to Ruby 1.8.7 and Rails 2.2.2.</p>
<p>Here is a relevant portion from the inline documentation for ERB:</p>
<p>| ERB recognizes certain tags in the provided template and converts them based on the rules below:<br />
|<br />
|<br />
|<br />
|<br />
|   % a line of Ruby code &#8212; treated as  (optional &#8212; see ERB.new)<br />
|   %% replaced with % if first thing on a line and % processing is used<br />
|    &#8212; replace with  respectively</p>
<p>So, contrary to some suggestions (<a href="http://www.ruby-forum.com/topic/154835#693739" rel="nofollow">http://www.ruby-forum.com/topic/154835#693739</a>), comments ARE allowed in ERB, but it seems to be safe only to do so when the whole embedded expression is a comment, i.e.:</p>
<p>If your &#8216;bad comments&#8217; are consistent in their usage of whitespace around the hash mark, then it ought to be easy to do a grep search-and-replace to change all your bad comments to look like this, which WILL work in Ruby 1.8.7:</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Commenting Out ERb code in Rails (*.html.erb) &#171; Ruby on Rails Notes</title>
		<link>http://blog.localkinegrinds.com/2008/05/02/erb-block-comments-in-rhtml-templates-using-ruby-on-rails/comment-page-1/#comment-29762</link>
		<dc:creator>Commenting Out ERb code in Rails (*.html.erb) &#171; Ruby on Rails Notes</dc:creator>
		<pubDate>Wed, 01 Oct 2008 07:05:39 +0000</pubDate>
		<guid isPermaLink="false">http://blog.localkinegrinds.com/?p=169#comment-29762</guid>
		<description>[...] &lt;melvinram&gt; nat2610: http://blog.localkinegrinds.com/2008/05/02/erb-block-comments-in-rhtml-templates-using-ruby-on-rails... [...]</description>
		<content:encoded><![CDATA[<p>[...] &lt;melvinram&gt; nat2610: <a href="http://blog.localkinegrinds.com/2008/05/02/erb-block-comments-in-rhtml-templates-using-ruby-on-rails.." rel="nofollow">http://blog.localkinegrinds.com/2008/05/02/erb-block-comments-in-rhtml-templates-using-ruby-on-rails..</a>. [...]</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Served from: blog.localkinegrinds.com @ 2012-02-07 21:45:30 -->
