<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>:ski_on_rails</title>
	<atom:link href="http://skionrails.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://skionrails.wordpress.com</link>
	<description>On track to becoming a big train</description>
	<lastBuildDate>Thu, 12 Jun 2008 13:13:13 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<cloud domain='skionrails.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://www.gravatar.com/blavatar/31a4aa50b60d9bf021a4be4df8191a7d?s=96&#038;d=http://s.wordpress.com/i/buttonw-com.png</url>
		<title>:ski_on_rails</title>
		<link>http://skionrails.wordpress.com</link>
	</image>
			<item>
		<title>link_to_unless_current without request parameters</title>
		<link>http://skionrails.wordpress.com/2008/06/12/link-to-unless-current-without-request-parameters/</link>
		<comments>http://skionrails.wordpress.com/2008/06/12/link-to-unless-current-without-request-parameters/#comments</comments>
		<pubDate>Thu, 12 Jun 2008 10:32:15 +0000</pubDate>
		<dc:creator>Olafski</dc:creator>
				<category><![CDATA[Ruby on Rails]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://skionrails.wordpress.com/?p=32</guid>
		<description><![CDATA[How to ignore request parameters with link_to_unless_current in Rails.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=skionrails.wordpress.com&blog=3774768&post=32&subd=skionrails&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Not a really big thing, but I felt the need for a method like link_to_unless_current which ignores request parameters (you know, those things that come after the &#8216;?&#8217; in the url). I couldn&#8217;t find it in the Rails api, so I wrote my own little snippet in a helper:</p>
<pre class="brush: ruby;">

  # makes a link unless 'link' equals the current
  # page ignoring request parameters
  #
  # e.g. this will not make a link:
  #   current page = http://your.web.site/articles?page=2
  #   link = http://your.web.site/articles
  # but this will:
  #   current page = http://your.web.site/articles/2
  #   link = http://your.web.site/articles
  def link_to_unless_current_ignore_parameters(title, link)
    link_to_unless(request.request_uri.gsub(/\?.*/, '') == url_for(link), title, link)
  end
</pre>
<p>If someone knows a better way, please let me know :) I thought about aliasing the original method and having an optional boolean parameter that defines whether to ignore the request parameters, but decided to go with this instead.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/skionrails.wordpress.com/32/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/skionrails.wordpress.com/32/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/skionrails.wordpress.com/32/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/skionrails.wordpress.com/32/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/skionrails.wordpress.com/32/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/skionrails.wordpress.com/32/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/skionrails.wordpress.com/32/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/skionrails.wordpress.com/32/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/skionrails.wordpress.com/32/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/skionrails.wordpress.com/32/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/skionrails.wordpress.com/32/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/skionrails.wordpress.com/32/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=skionrails.wordpress.com&blog=3774768&post=32&subd=skionrails&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://skionrails.wordpress.com/2008/06/12/link-to-unless-current-without-request-parameters/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/9a6ca05b92a36e05fa4f9993569f7c7a?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">Olafski</media:title>
		</media:content>
	</item>
		<item>
		<title>Stratego: Next Edition released for DS</title>
		<link>http://skionrails.wordpress.com/2008/06/05/stratego-next-edition-released-for-ds/</link>
		<comments>http://skionrails.wordpress.com/2008/06/05/stratego-next-edition-released-for-ds/#comments</comments>
		<pubDate>Thu, 05 Jun 2008 07:48:47 +0000</pubDate>
		<dc:creator>Olafski</dc:creator>
				<category><![CDATA[Other]]></category>
		<category><![CDATA[games]]></category>
		<category><![CDATA[life]]></category>

		<guid isPermaLink="false">http://skionrails.wordpress.com/?p=29</guid>
		<description><![CDATA[Not normally something I&#8217;d do, but my friends&#8217; company (Triangle Studios) have had their first major title published by Ubisoft: Stratego: Next Edition.
I&#8217;ve played the RC and liked it quite a bit, this is definitely a title I would recommend to anyone who likes strategic games.
Congratulations to Triangle Studios :)

      [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=skionrails.wordpress.com&blog=3774768&post=29&subd=skionrails&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Not normally something I&#8217;d do, but my friends&#8217; company (<a title="TS" href="http://www.triangle-studios.com">Triangle Studios</a>) have had their first major title published by <a title="Ubisoft" href="http://www.ubi.com">Ubisoft</a>: Stratego: Next Edition.</p>
<p>I&#8217;ve played the RC and liked it quite a bit, this is definitely a title I would recommend to anyone who likes strategic games.</p>
<p>Congratulations to Triangle Studios :)</p>
<p style="text-align:center;"><a href="http://skionrails.files.wordpress.com/2008/06/stratego_next_edition.jpg"><img class="alignnone size-full wp-image-30 aligncenter" src="http://skionrails.files.wordpress.com/2008/06/stratego_next_edition.jpg?w=450&#038;h=337" alt="Cover Art" width="450" height="337" /></a></p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/skionrails.wordpress.com/29/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/skionrails.wordpress.com/29/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/skionrails.wordpress.com/29/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/skionrails.wordpress.com/29/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/skionrails.wordpress.com/29/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/skionrails.wordpress.com/29/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/skionrails.wordpress.com/29/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/skionrails.wordpress.com/29/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/skionrails.wordpress.com/29/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/skionrails.wordpress.com/29/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/skionrails.wordpress.com/29/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/skionrails.wordpress.com/29/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=skionrails.wordpress.com&blog=3774768&post=29&subd=skionrails&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://skionrails.wordpress.com/2008/06/05/stratego-next-edition-released-for-ds/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/9a6ca05b92a36e05fa4f9993569f7c7a?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">Olafski</media:title>
		</media:content>

		<media:content url="http://skionrails.files.wordpress.com/2008/06/stratego_next_edition.jpg" medium="image">
			<media:title type="html">Cover Art</media:title>
		</media:content>
	</item>
		<item>
		<title>Coding font roundup</title>
		<link>http://skionrails.wordpress.com/2008/05/26/coding-font-roundup/</link>
		<comments>http://skionrails.wordpress.com/2008/05/26/coding-font-roundup/#comments</comments>
		<pubDate>Mon, 26 May 2008 06:49:07 +0000</pubDate>
		<dc:creator>Olafski</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[fonts]]></category>
		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://skionrails.wordpress.com/?p=27</guid>
		<description><![CDATA[As a followup of the poll about &#8220;What coding font do you use?&#8221; on Rails Envy, here are the results and a PDF showing all the fonts for comparison:

Monaco (37%)
Bitstream Vera Sans Mono (20%)
Consolas (14%)
Deja Vu (5%)
Inconsolata (4%)
Liberation Mono (2%)
Pro Font (2%)
Courier New (1.5%)
Lucida Console (1%)
Monospace (1%)

Some old favourites in there, but they seem to [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=skionrails.wordpress.com&blog=3774768&post=27&subd=skionrails&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>As a followup of the poll about &#8220;What coding font do you use?&#8221; on <a title="Rails Envy" href="http://www.railsenvy.com/">Rails Envy</a>, here are the results and a PDF showing all the fonts for comparison:</p>
<ol>
<li>Monaco (37%)</li>
<li>Bitstream Vera Sans Mono (20%)</li>
<li>Consolas (14%)</li>
<li>Deja Vu (5%)</li>
<li>Inconsolata (4%)</li>
<li>Liberation Mono (2%)</li>
<li>Pro Font (2%)</li>
<li>Courier New (1.5%)</li>
<li>Lucida Console (1%)</li>
<li>Monospace (1%)</li>
</ol>
<p>Some old favourites in there, but they seem to be going out of style in favor of the new ones. Consolas is one of the new fonts that ships with Windows Vista (or was it Office 2007?), Bitstream Vera Sans Mono is the font Ryan Bates at <a title="Railscasts" href="http://www.railscasts.com/">Railscasts</a> and (I think) Monaco is the default font in <a title="Textmate" href="http://macromates.com/">Textmate</a>.</p>
<p>Check out the pdf <a href="http://130.89.168.156/blog_files/monofonts.pdf">here</a>. I use Consolas ;)</p>
<p>Update: I&#8217;ve heard that some users can&#8217;t view all the fonts in the PDF, so <a title="Monospace fonts png" href="http://130.89.168.156/blog_files/monofonts.png">here&#8217;s a PNG</a> of all the pages put together.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/skionrails.wordpress.com/27/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/skionrails.wordpress.com/27/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/skionrails.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/skionrails.wordpress.com/27/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/skionrails.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/skionrails.wordpress.com/27/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/skionrails.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/skionrails.wordpress.com/27/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/skionrails.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/skionrails.wordpress.com/27/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/skionrails.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/skionrails.wordpress.com/27/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=skionrails.wordpress.com&blog=3774768&post=27&subd=skionrails&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://skionrails.wordpress.com/2008/05/26/coding-font-roundup/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/9a6ca05b92a36e05fa4f9993569f7c7a?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">Olafski</media:title>
		</media:content>
	</item>
		<item>
		<title>First tutorial: Writing a blog in Rails 2.0.2</title>
		<link>http://skionrails.wordpress.com/2008/05/24/first-tutorial-writing-a-blog-in-rails-202/</link>
		<comments>http://skionrails.wordpress.com/2008/05/24/first-tutorial-writing-a-blog-in-rails-202/#comments</comments>
		<pubDate>Sat, 24 May 2008 13:07:11 +0000</pubDate>
		<dc:creator>Olafski</dc:creator>
				<category><![CDATA[Ruby on Rails]]></category>
		<category><![CDATA[15 minutes]]></category>
		<category><![CDATA[blog]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://skionrails.wordpress.com/?p=25</guid>
		<description><![CDATA[I&#8217;ve just finished my first tutorial, writing a blog in Rails 2.0.2. It&#8217;s of course inspired by the great 15 minute blog screencast by DHH, which convinced me to try Rails in the first place. This one is with some new Rails 2 conventions and explanations on why some things work.
Now, without further ado, go [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=skionrails.wordpress.com&blog=3774768&post=25&subd=skionrails&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>I&#8217;ve just finished my first tutorial, writing a blog in Rails 2.0.2. It&#8217;s of course inspired by the <a href="http://media.rubyonrails.org/video/rails_take2_with_sound.mov">great 15 minute blog</a> screencast by DHH, which convinced me to try Rails in the first place. This one is with some new Rails 2 conventions and explanations on why some things work.</p>
<p>Now, without further ado, go and read it:</p>
<p><a href="http://skionrails.wordpress.com/tutorials/how-to-write-a-blog-in-15-minutes/">How to write a blog in Rails 2.0.2 (not quite in 15 minutes)</a></p>
<p>Comments and criticisms are always welcome, it&#8217;s my first tutorial ;)</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/skionrails.wordpress.com/25/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/skionrails.wordpress.com/25/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/skionrails.wordpress.com/25/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/skionrails.wordpress.com/25/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/skionrails.wordpress.com/25/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/skionrails.wordpress.com/25/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/skionrails.wordpress.com/25/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/skionrails.wordpress.com/25/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/skionrails.wordpress.com/25/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/skionrails.wordpress.com/25/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/skionrails.wordpress.com/25/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/skionrails.wordpress.com/25/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=skionrails.wordpress.com&blog=3774768&post=25&subd=skionrails&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://skionrails.wordpress.com/2008/05/24/first-tutorial-writing-a-blog-in-rails-202/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
<enclosure url="http://media.rubyonrails.org/video/rails_take2_with_sound.mov" length="54364199" type="video/quicktime" />
	
		<media:content url="http://1.gravatar.com/avatar/9a6ca05b92a36e05fa4f9993569f7c7a?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">Olafski</media:title>
		</media:content>
	</item>
		<item>
		<title>Conditional fragment caching</title>
		<link>http://skionrails.wordpress.com/2008/05/22/conditional-fragment-caching/</link>
		<comments>http://skionrails.wordpress.com/2008/05/22/conditional-fragment-caching/#comments</comments>
		<pubDate>Thu, 22 May 2008 08:29:14 +0000</pubDate>
		<dc:creator>Olafski</dc:creator>
				<category><![CDATA[Ruby on Rails]]></category>
		<category><![CDATA[caching]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://skionrails.wordpress.com/?p=8</guid>
		<description><![CDATA[We were just wondering if it&#8217;s possible to provide a condition to fragment caching, in order to only cache certain fragments when no user is logged in to our site. This is to ensure anonymous users (the majority of visitors), who will see the same page anyway, will get it loaded from cache. People who [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=skionrails.wordpress.com&blog=3774768&post=8&subd=skionrails&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>We were just wondering if it&#8217;s possible to provide a condition to fragment caching, in order to only cache certain fragments when no user is logged in to our site. This is to ensure anonymous users (the majority of visitors), who will see the same page anyway, will get it loaded from cache. People who log in will see their personalized site.</p>
<p>I was unable to find anything on Google about this, so I wrote my own helper. It looks so obvious that I&#8217;m probably not the first to write this, but I figured I&#8217;d share it anyway:</p>
<pre class="brush: ruby;">
  def cache_if (condition, name = {}, &amp;block)
    if condition
      cache(name, &amp;block)
    else
      yield
    end
  end
</pre>
<p>Using this, you can write something like:</p>
<pre class="brush: ruby;">
&lt;% cache_if @current_user.blank?, 'navigation' do %&gt;
  Navigation content here, including user specific navigation
&lt;% end %&gt;
</pre>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/skionrails.wordpress.com/8/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/skionrails.wordpress.com/8/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/skionrails.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/skionrails.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/skionrails.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/skionrails.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/skionrails.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/skionrails.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/skionrails.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/skionrails.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/skionrails.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/skionrails.wordpress.com/8/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=skionrails.wordpress.com&blog=3774768&post=8&subd=skionrails&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://skionrails.wordpress.com/2008/05/22/conditional-fragment-caching/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/9a6ca05b92a36e05fa4f9993569f7c7a?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">Olafski</media:title>
		</media:content>
	</item>
		<item>
		<title>Loading additional files when starting script/console</title>
		<link>http://skionrails.wordpress.com/2008/05/22/loading-additional-files-when-starting-scriptconsole/</link>
		<comments>http://skionrails.wordpress.com/2008/05/22/loading-additional-files-when-starting-scriptconsole/#comments</comments>
		<pubDate>Thu, 22 May 2008 06:41:38 +0000</pubDate>
		<dc:creator>Olafski</dc:creator>
				<category><![CDATA[Ruby on Rails]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://skionrails.wordpress.com/?p=7</guid>
		<description><![CDATA[I use the Rails console quite a lot, and from a co-worker I had received a .irbrc file that contains a method called &#8216;log_to&#8217; which enables on-screen query logging in the Rails console. It still required me to call this method every time I started the console though, because even though it&#8217;s defined in .irbrc, [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=skionrails.wordpress.com&blog=3774768&post=7&subd=skionrails&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>I use the Rails console quite a lot, and from a co-worker I had received a .irbrc file that contains a method called &#8216;log_to&#8217; which enables on-screen query logging in the Rails console. It still required me to call this method every time I started the console though, because even though it&#8217;s defined in .irbrc, it cannot be executed from there since it uses Rails specific code (which is not loaded at the time that the .irbrc is loaded.</p>
<p>So, naturally I was wondering whether it is possible to auto-execute any commands while starting script/console. It turns out it isn&#8217;t (according to the friendly people on IRC). With the help of madnificent though, I can now do it. He made a small change to rails/railties/lib/commands/console.rb, which will change the behaviour of the console such that it will look in #{RAILS_ROOT}/console_scripts for any additional Ruby files to load.</p>
<p>Please note, for this to work you will need to either freeze rails in your vendor directory, or change your local rails source. As I&#8217;m very new to Rails I&#8217;m not sure why this kind of functionality is not already in (or perhaps it is but I just could not find it), but I&#8217;m hoping it will be picked up somehow ;)</p>
<p>I have also included the script I wanted to load in the first place, I find it quite handy to be able to see what kind of queries my commands are generating.</p>
<p>You can find the files on <a title="Patch + sql logging on Pastie" href="http://pastie.caboo.se/200988">Pastie</a> and on my webserver (<a title="rails/railties/lib/commands/console.rb" href="http://130.89.168.156/blog_files/console.rb">console.rb</a> and <a title="#{RAILS_ROOT}/console_scripts/enable_sql_logging.rb" href="http://130.89.168.156/blog_files/enable_sql_logging.rb">enable_sql_logging.rb</a>).</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/skionrails.wordpress.com/7/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/skionrails.wordpress.com/7/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/skionrails.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/skionrails.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/skionrails.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/skionrails.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/skionrails.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/skionrails.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/skionrails.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/skionrails.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/skionrails.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/skionrails.wordpress.com/7/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=skionrails.wordpress.com&blog=3774768&post=7&subd=skionrails&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://skionrails.wordpress.com/2008/05/22/loading-additional-files-when-starting-scriptconsole/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/9a6ca05b92a36e05fa4f9993569f7c7a?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">Olafski</media:title>
		</media:content>
	</item>
		<item>
		<title>Pretty test output with the Turn gem</title>
		<link>http://skionrails.wordpress.com/2008/05/20/pretty-test-output-with-the-turn-gem/</link>
		<comments>http://skionrails.wordpress.com/2008/05/20/pretty-test-output-with-the-turn-gem/#comments</comments>
		<pubDate>Tue, 20 May 2008 17:35:37 +0000</pubDate>
		<dc:creator>Olafski</dc:creator>
				<category><![CDATA[Ruby on Rails]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[testing]]></category>

		<guid isPermaLink="false">http://skionrails.wordpress.com/?p=5</guid>
		<description><![CDATA[Have you ever been annoyed that when you run tests, you only see periods, E&#8217;s and F&#8217;s; not being able to see what actually went wrong until all the tests were done?
I found this pretty gem last week, thanks to some nice people in #rubyonrails. It&#8217;s called Turn, and I am unable to find a [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=skionrails.wordpress.com&blog=3774768&post=5&subd=skionrails&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Have you ever been annoyed that when you run tests, you only see periods, E&#8217;s and F&#8217;s; not being able to see what actually went wrong until all the tests were done?</p>
<p>I found this pretty gem last week, thanks to some nice people in #rubyonrails. It&#8217;s called Turn, and I am unable to find a repository for it anywhere. What it does, is update your test output as follows:</p>
<p>Without Turn:</p>
<pre>Loaded suite
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake/rake_test_loader
Started
........
Finished in 0.339899 seconds.
8 tests, 8 assertions, 0 failures, 0 errors</pre>
<p>With Turn:</p>
<pre>Loaded suite
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake/rake_test_loader
CourseInstanceTest

test_truth                                                            PASS
CourseTest

test_truth                                                            PASS
# some output removed here
==============================================================================
pass: 8,  fail: 0,  error: 0
total: 8 tests with 8 assertions in 0.373991 seconds
==============================================================================</pre>
<p>This way, you will be notified which tests fail right after it fails, which can save considerable time; you will be able to start fixing it before your test suite is finished (which can take quite some time I&#8217;ve noticed). As an added bonus, if you have the &#8216;<a title="Facets Ruby Gem" href="http://facets.rubyforge.org/">facets</a>&#8216; gem installed, it will even colorize the output.</p>
<p>I&#8217;ve made a small modification to the gem which allows you to specify whether or not you want to hide passed tests, since this produces quite a lot more output than the default Test::Unit output. However, I don&#8217;t have access to this modification right now, I&#8217;ll add it later.</p>
<p>To install:</p>
<pre>gem install turn</pre>
<p>To enable:</p>
<p>Add this to your test/test_helper.rb:</p>
<pre class="brush: ruby;">begin
  require 'turn'
rescue LoadError
  puts 'Install the Turn gem for prettier test output.'
end</pre>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/skionrails.wordpress.com/5/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/skionrails.wordpress.com/5/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/skionrails.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/skionrails.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/skionrails.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/skionrails.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/skionrails.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/skionrails.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/skionrails.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/skionrails.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/skionrails.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/skionrails.wordpress.com/5/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=skionrails.wordpress.com&blog=3774768&post=5&subd=skionrails&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://skionrails.wordpress.com/2008/05/20/pretty-test-output-with-the-turn-gem/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/9a6ca05b92a36e05fa4f9993569f7c7a?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">Olafski</media:title>
		</media:content>
	</item>
		<item>
		<title>First post :)</title>
		<link>http://skionrails.wordpress.com/2008/05/20/first-post/</link>
		<comments>http://skionrails.wordpress.com/2008/05/20/first-post/#comments</comments>
		<pubDate>Tue, 20 May 2008 17:02:31 +0000</pubDate>
		<dc:creator>Olafski</dc:creator>
				<category><![CDATA[Other]]></category>

		<guid isPermaLink="false">http://skionrails.wordpress.com/?p=4</guid>
		<description><![CDATA[This is the first post on my blog ;) I have been working with Ruby on Rails for a very short while now, and figured it would be nice to report on the issues I encounter, as well as nifty little gems/plugins I find.
Don&#8217;t expect very regular postings as I&#8217;m a chaotic person, but I&#8217;ll [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=skionrails.wordpress.com&blog=3774768&post=4&subd=skionrails&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>This is the first post on my blog ;) I have been working with Ruby on Rails for a very short while now, and figured it would be nice to report on the issues I encounter, as well as nifty little gems/plugins I find.</p>
<p>Don&#8217;t expect very regular postings as I&#8217;m a chaotic person, but I&#8217;ll try to put something here every now and then.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/skionrails.wordpress.com/4/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/skionrails.wordpress.com/4/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/skionrails.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/skionrails.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/skionrails.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/skionrails.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/skionrails.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/skionrails.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/skionrails.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/skionrails.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/skionrails.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/skionrails.wordpress.com/4/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=skionrails.wordpress.com&blog=3774768&post=4&subd=skionrails&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://skionrails.wordpress.com/2008/05/20/first-post/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/9a6ca05b92a36e05fa4f9993569f7c7a?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">Olafski</media:title>
		</media:content>
	</item>
	</channel>
</rss>