<?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: Good Error Messages Point the Way</title>
	<atom:link href="http://www.postal-code.com/binarycode/2008/05/31/good-error-messages-point-the-way/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.postal-code.com/binarycode/2008/05/31/good-error-messages-point-the-way/</link>
	<description>A whole bunch of nought thought by Chris Cummer</description>
	<lastBuildDate>Sat, 06 Jun 2009 22:54:39 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
	<item>
		<title>By: chris</title>
		<link>http://www.postal-code.com/binarycode/2008/05/31/good-error-messages-point-the-way/comment-page-1/#comment-4136</link>
		<dc:creator>chris</dc:creator>
		<pubDate>Tue, 30 Dec 2008 18:05:33 +0000</pubDate>
		<guid isPermaLink="false">http://www.postal-code.com/binarycode/?p=208#comment-4136</guid>
		<description>Well, I do actually describe the solution, just not as a single block of code. I suppose I could have been more clear. If you get this error above you actually do need to over-ride the allow_to method in your controller and call super() from within it, like so:

controller Blah
  def allow_to()
    # Do your own stuff here
    super()
  end
end

From the Loved By Less source we see this sort of example:

protected
  def allow_to 
    super :all, :all=&gt;true
  end

We need to call super() because that throws the call back up to the ApplicationController which has:

  def allow_to( level = nil, args = {} )
    return unless level
    @level &#124;&#124;= []
    @level &lt;&lt; [level, args]    
  end

the block of code that handles permissions for actions in the project.</description>
		<content:encoded><![CDATA[<p>Well, I do actually describe the solution, just not as a single block of code. I suppose I could have been more clear. If you get this error above you actually do need to over-ride the allow_to method in your controller and call super() from within it, like so:</p>
<p>controller Blah<br />
  def allow_to()<br />
    # Do your own stuff here<br />
    super()<br />
  end<br />
end</p>
<p>From the Loved By Less source we see this sort of example:</p>
<p>protected<br />
  def allow_to<br />
    super :all, :all=>true<br />
  end</p>
<p>We need to call super() because that throws the call back up to the ApplicationController which has:</p>
<p>  def allow_to( level = nil, args = {} )<br />
    return unless level<br />
    @level ||= []<br />
    @level << [level, args]<br />
  end</p>
<p>the block of code that handles permissions for actions in the project.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: AG</title>
		<link>http://www.postal-code.com/binarycode/2008/05/31/good-error-messages-point-the-way/comment-page-1/#comment-4134</link>
		<dc:creator>AG</dc:creator>
		<pubDate>Tue, 30 Dec 2008 13:57:51 +0000</pubDate>
		<guid isPermaLink="false">http://www.postal-code.com/binarycode/?p=208#comment-4134</guid>
		<description>ok, good point about the nature and evolution of error messages. and i&#039;m happy i found your post, thanks man.

for this particular problem though, I don&#039;t get why super would help, and if you figured out how, could you please paste some code and some more background information? it&#039;s just that inventing the wheel over and over again ....

just because &quot;Bad blog posts throw up blog topics. Mediocre ones hint at the content. Good blog posts point the way to a better day.&quot; ;-)</description>
		<content:encoded><![CDATA[<p>ok, good point about the nature and evolution of error messages. and i&#8217;m happy i found your post, thanks man.</p>
<p>for this particular problem though, I don&#8217;t get why super would help, and if you figured out how, could you please paste some code and some more background information? it&#8217;s just that inventing the wheel over and over again &#8230;.</p>
<p>just because &#8220;Bad blog posts throw up blog topics. Mediocre ones hint at the content. Good blog posts point the way to a better day.&#8221; <img src='http://www.postal-code.com/binarycode/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
</channel>
</rss>
