<?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 I18n and 404/500 Error Pages</title>
	<atom:link href="http://devcorner.mynewsdesk.com/2010/01/13/rails-i18n-and-404500-error-pages/feed/" rel="self" type="application/rss+xml" />
	<link>http://devcorner.mynewsdesk.com/2010/01/13/rails-i18n-and-404500-error-pages/</link>
	<description>This is the blog by the Ruby on Rails developers behind the News exchange site mynewsdesk.com</description>
	<lastBuildDate>Thu, 20 Oct 2011 12:12:00 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.4</generator>
	<item>
		<title>By: Anonymous</title>
		<link>http://devcorner.mynewsdesk.com/2010/01/13/rails-i18n-and-404500-error-pages/#comment-17699</link>
		<dc:creator>Anonymous</dc:creator>
		<pubDate>Fri, 10 Jun 2011 07:51:00 +0000</pubDate>
		<guid isPermaLink="false">http://developer.newsdesk.se/?p=158#comment-17699</guid>
		<description>Thank you for your quick answer :)</description>
		<content:encoded><![CDATA[<p>Thank you for your quick answer <img src='http://devcorner.mynewsdesk.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Martin Svalin</title>
		<link>http://devcorner.mynewsdesk.com/2010/01/13/rails-i18n-and-404500-error-pages/#comment-17698</link>
		<dc:creator>Martin Svalin</dc:creator>
		<pubDate>Fri, 10 Jun 2011 07:41:00 +0000</pubDate>
		<guid isPermaLink="false">http://developer.newsdesk.se/?p=158#comment-17698</guid>
		<description>Hi,
The rake task doesn&#039;t use Rails&#039; render method, and doesn&#039;t render layouts. It just interprets the ERB files you provide in app/views/errors/.

The I18n.with_locale method lets you run a block without changing your I18n.locale. It temporarily sets the locale, runs the block, and resets the locale. I use it often at the Rails console, to quickly look at the result of some code under different locales. Or to set translated attributes in AR: 
I18n.with_locale(:en) { Category.find(1).update_attribute :name, &quot;Name in English&quot; }
I18n.with_locale(:sv) { Category.find(1).update_attribute :name, &quot;Namn på svenska&quot; }

Very useful.</description>
		<content:encoded><![CDATA[<p>Hi,<br />
The rake task doesn&#8217;t use Rails&#8217; render method, and doesn&#8217;t render layouts. It just interprets the ERB files you provide in app/views/errors/.</p>
<p>The I18n.with_locale method lets you run a block without changing your I18n.locale. It temporarily sets the locale, runs the block, and resets the locale. I use it often at the Rails console, to quickly look at the result of some code under different locales. Or to set translated attributes in AR: <br />
I18n.with_locale(:en) { Category.find(1).update_attribute :name, &#8220;Name in English&#8221; }<br />
I18n.with_locale(:sv) { Category.find(1).update_attribute :name, &#8220;Namn på svenska&#8221; }</p>
<p>Very useful.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anonymous</title>
		<link>http://devcorner.mynewsdesk.com/2010/01/13/rails-i18n-and-404500-error-pages/#comment-17697</link>
		<dc:creator>Anonymous</dc:creator>
		<pubDate>Fri, 10 Jun 2011 07:29:00 +0000</pubDate>
		<guid isPermaLink="false">http://developer.newsdesk.se/?p=158#comment-17697</guid>
		<description>Is this solution suppose to render any layout as well?  Another question, which is the purpose of the with_locale method?Thanks for sharing.</description>
		<content:encoded><![CDATA[<p>Is this solution suppose to render any layout as well?  Another question, which is the purpose of the with_locale method?Thanks for sharing.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: bolsanova</title>
		<link>http://devcorner.mynewsdesk.com/2010/01/13/rails-i18n-and-404500-error-pages/#comment-17696</link>
		<dc:creator>bolsanova</dc:creator>
		<pubDate>Thu, 09 Jun 2011 21:36:00 +0000</pubDate>
		<guid isPermaLink="false">http://developer.newsdesk.se/?p=158#comment-17696</guid>
		<description> Is thi</description>
		<content:encoded><![CDATA[<p> Is thi</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: bolsanova</title>
		<link>http://devcorner.mynewsdesk.com/2010/01/13/rails-i18n-and-404500-error-pages/#comment-17695</link>
		<dc:creator>bolsanova</dc:creator>
		<pubDate>Thu, 09 Jun 2011 21:35:00 +0000</pubDate>
		<guid isPermaLink="false">http://developer.newsdesk.se/?p=158#comment-17695</guid>
		<description>Is this solution suppose to render any layout as well?  Another question, which is the purpose of the with_locale method?

Thanks for sharing.</description>
		<content:encoded><![CDATA[<p>Is this solution suppose to render any layout as well?  Another question, which is the purpose of the with_locale method?</p>
<p>Thanks for sharing.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: grimen</title>
		<link>http://devcorner.mynewsdesk.com/2010/01/13/rails-i18n-and-404500-error-pages/#comment-9107</link>
		<dc:creator>grimen</dc:creator>
		<pubDate>Mon, 18 Jan 2010 17:43:22 +0000</pubDate>
		<guid isPermaLink="false">http://developer.newsdesk.se/?p=158#comment-9107</guid>
		<description>This is what I did:

http://pastie.org/783449

...enabled with:

class ApplicationController &lt; ActionController::Base
  inlcude Application::ErrorFilters
end

I guess my solution won&#039;t work for non-Rails-triggered 500 errors (haven&#039;t tested) when page-caching is not used, but haven&#039;t tested that yet.</description>
		<content:encoded><![CDATA[<p>This is what I did:</p>
<p><a href="http://pastie.org/783449" rel="nofollow">http://pastie.org/783449</a></p>
<p>&#8230;enabled with:</p>
<p>class ApplicationController &lt; ActionController::Base<br />
  inlcude Application::ErrorFilters<br />
end</p>
<p>I guess my solution won&#8217;t work for non-Rails-triggered 500 errors (haven&#8217;t tested) when page-caching is not used, but haven&#8217;t tested that yet.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

