<?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: Rails, Resources and Permalinks</title> <atom:link href="http://ariejan.net/2007/04/12/rails-resources-and-permalinks/feed/" rel="self" type="application/rss+xml" /><link>http://ariejan.net/2007/04/12/rails-resources-and-permalinks/</link> <description>Code Monkey</description> <lastBuildDate>Sat, 13 Mar 2010 07:28:35 +0000</lastBuildDate> <generator>http://wordpress.org/?v=2.9.2</generator> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <item><title>By: patrick</title><link>http://ariejan.net/2007/04/12/rails-resources-and-permalinks/comment-page-1/#comment-10568</link> <dc:creator>patrick</dc:creator> <pubDate>Mon, 14 Jul 2008 08:08:02 +0000</pubDate> <guid
isPermaLink="false">http://beta.ariejan.net/?p=104#comment-10568</guid> <description>Oarsome thanks for that :)</description> <content:encoded><![CDATA[<p>Oarsome thanks for that :)</p> ]]></content:encoded> </item> <item><title>By: Ariejan de Vroom</title><link>http://ariejan.net/2007/04/12/rails-resources-and-permalinks/comment-page-1/#comment-10567</link> <dc:creator>Ariejan de Vroom</dc:creator> <pubDate>Mon, 14 Jul 2008 07:19:38 +0000</pubDate> <guid
isPermaLink="false">http://beta.ariejan.net/?p=104#comment-10567</guid> <description>@Patrick: You are calling #permalink on a nil object. This means that you either don&#039;t load any data or that the data you are looking for couldn&#039;t be found. For example:&lt;pre lang=&quot;ruby&quot;&gt;@page.permalink # nil error, @page is not initialized@page.find_by_permalink(&#039;i-dont-exist&#039;)
@page.permalink # nil error, there is not page found.&lt;/pre&gt;Hope this helps. If you&#039;re really new to RoR, consider buying a few books first before diving in head-first. It really helps.As an added bonus, you could check for the nil-ness of your variable:&lt;pre lang=&quot;ruby&quot;&gt;@page.find_by_permalink(&#039;i-dont-exist&#039;)
if @page.nil?
p &quot;Page not found!&quot;
else
@page.permalink
end&lt;/pre&gt;</description> <content:encoded><![CDATA[<p>@Patrick: You are calling #permalink on a nil object. This means that you either don&#8217;t load any data or that the data you are looking for couldn&#8217;t be found. For example:</p><div
class="wp_syntax"><div
class="code"><pre class="ruby" style="font-family:monospace;"><span style="color:#0066ff; font-weight:bold;">@page</span>.<span style="color:#9900CC;">permalink</span> <span style="color:#008000; font-style:italic;"># nil error, @page is not initialized</span>
&nbsp;
<span style="color:#0066ff; font-weight:bold;">@page</span>.<span style="color:#9900CC;">find_by_permalink</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#996600;">'i-dont-exist'</span><span style="color:#006600; font-weight:bold;">&#41;</span>
<span style="color:#0066ff; font-weight:bold;">@page</span>.<span style="color:#9900CC;">permalink</span> <span style="color:#008000; font-style:italic;"># nil error, there is not page found.</span></pre></div></div><p>Hope this helps. If you&#8217;re really new to RoR, consider buying a few books first before diving in head-first. It really helps.</p><p>As an added bonus, you could check for the nil-ness of your variable:</p><div
class="wp_syntax"><div
class="code"><pre class="ruby" style="font-family:monospace;"><span style="color:#0066ff; font-weight:bold;">@page</span>.<span style="color:#9900CC;">find_by_permalink</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#996600;">'i-dont-exist'</span><span style="color:#006600; font-weight:bold;">&#41;</span>
<span style="color:#9966CC; font-weight:bold;">if</span> <span style="color:#0066ff; font-weight:bold;">@page</span>.<span style="color:#0000FF; font-weight:bold;">nil</span>?
  <span style="color:#CC0066; font-weight:bold;">p</span> <span style="color:#996600;">&quot;Page not found!&quot;</span>
<span style="color:#9966CC; font-weight:bold;">else</span>
  <span style="color:#0066ff; font-weight:bold;">@page</span>.<span style="color:#9900CC;">permalink</span>
<span style="color:#9966CC; font-weight:bold;">end</span></pre></div></div>]]></content:encoded> </item> <item><title>By: patrick</title><link>http://ariejan.net/2007/04/12/rails-resources-and-permalinks/comment-page-1/#comment-10566</link> <dc:creator>patrick</dc:creator> <pubDate>Mon, 14 Jul 2008 06:56:50 +0000</pubDate> <guid
isPermaLink="false">http://beta.ariejan.net/?p=104#comment-10566</guid> <description>I am a newbee at ROR, I am using netbeans with JRUBY 1.1
I keep getting the error of
&quot; You have a nil object when you didn&#039;t expect it!
The error occurred while evaluating nil.permalink &quot;I have tried almost every tutorial that exists on the internet for SEO urls on ROR
with no luck getting any working. I have also tried friendy_id plugin
Please help ......!</description> <content:encoded><![CDATA[<p>I am a newbee at ROR, I am using netbeans with JRUBY 1.1<br
/> I keep getting the error of<br
/> &#8221; You have a nil object when you didn&#8217;t expect it!<br
/> The error occurred while evaluating nil.permalink &#8221;</p><p>I have tried almost every tutorial that exists on the internet for SEO urls on ROR<br
/> with no luck getting any working. I have also tried friendy_id plugin<br
/> Please help &#8230;&#8230;!</p> ]]></content:encoded> </item> <item><title>By: Dimitry</title><link>http://ariejan.net/2007/04/12/rails-resources-and-permalinks/comment-page-1/#comment-269</link> <dc:creator>Dimitry</dc:creator> <pubDate>Thu, 10 May 2007 04:51:09 +0000</pubDate> <guid
isPermaLink="false">http://beta.ariejan.net/?p=104#comment-269</guid> <description>Just what I needed. Getting into Rails development right now and was looking for a good tutorial on this.Thank you</description> <content:encoded><![CDATA[<p>Just what I needed. Getting into Rails development right now and was looking for a good tutorial on this.</p><p>Thank you</p> ]]></content:encoded> </item> <item><title>By: Rails???? &#187; Archive &#187; ????permlink?????</title><link>http://ariejan.net/2007/04/12/rails-resources-and-permalinks/comment-page-1/#comment-268</link> <dc:creator>Rails???? &#187; Archive &#187; ????permlink?????</dc:creator> <pubDate>Tue, 17 Apr 2007 07:32:42 +0000</pubDate> <guid
isPermaLink="false">http://beta.ariejan.net/?p=104#comment-268</guid> <description>[...] ????permalink_url(@page.permalink) ???? [...]</description> <content:encoded><![CDATA[<p>[...] ????permalink_url(@page.permalink) ???? [...]</p> ]]></content:encoded> </item> <item><title>By: 13.vc &#187; Blog Archive &#187; Rails, Resources and Permalinks</title><link>http://ariejan.net/2007/04/12/rails-resources-and-permalinks/comment-page-1/#comment-267</link> <dc:creator>13.vc &#187; Blog Archive &#187; Rails, Resources and Permalinks</dc:creator> <pubDate>Thu, 12 Apr 2007 09:16:07 +0000</pubDate> <guid
isPermaLink="false">http://beta.ariejan.net/?p=104#comment-267</guid> <description>[...] article explains how to combine rails resources and permalinks together.read more &#124; digg [...]</description> <content:encoded><![CDATA[<p>[...] article explains how to combine rails resources and permalinks together.read more | digg [...]</p> ]]></content:encoded> </item> </channel> </rss>
<!-- This site's performance optimized by W3 Total Cache. Dramatically improve the speed and reliability of your blog!

Learn more about our WordPress Plugins: http://www.w3-edge.com/wordpress-plugins/

Minified using memcached
Page Caching using memcached (user agent is rejected)

Served from: starbuck.ariejan.net @ 2010-03-13 12:41:15 -->