<?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/"
	>

<channel>
	<title>Gittr &#187; Rails</title>
	<atom:link href="http://www.gittr.com/index.php/archive/category/programming/rails/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.gittr.com</link>
	<description>eval("eval(\"eval(\\\"puts 'a ruby weblog'\\\")\")")</description>
	<lastBuildDate>Thu, 22 Oct 2009 12:54:31 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>ActiveRecord timezones without Rails</title>
		<link>http://www.gittr.com/index.php/archive/activerecord-timezones-without-rails/</link>
		<comments>http://www.gittr.com/index.php/archive/activerecord-timezones-without-rails/#comments</comments>
		<pubDate>Tue, 23 Jun 2009 14:23:00 +0000</pubDate>
		<dc:creator>cschneid</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Rails]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[Sinatra]]></category>

		<guid isPermaLink="false">http://www.gittr.com/?p=77</guid>
		<description><![CDATA[I was using Active Record in a batch application to manipulate some data, and I needed the timezone handling built into the newer versions.  But I had a hell of a time trying to figure out how to make it all&#160;work. 
In plain Rails, it&#8217;s&#160;simple:

Rails::Initializer.run do &#124;config&#124;
  config.time_zone = 'Pacific Time (US &#38; [...]]]></description>
			<content:encoded><![CDATA[<p>I was using Active Record in a batch application to manipulate some data, and I needed the timezone handling built into the newer versions.  But I had a hell of a time trying to figure out how to make it all&nbsp;work. </p>
<p>In plain Rails, it&#8217;s&nbsp;simple:</p>

<div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;"><span style="color:#6666ff; font-weight:bold;">Rails::Initializer</span>.<span style="color:#9900CC;">run</span> <span style="color:#9966CC; font-weight:bold;">do</span> <span style="color:#006600; font-weight:bold;">|</span>config<span style="color:#006600; font-weight:bold;">|</span>
  config.<span style="color:#9900CC;">time_zone</span> = <span style="color:#996600;">'Pacific Time (<span class="caps">US</span> <span class="amp">&amp;</span> Canada)'</span>
<span style="color:#9966CC; font-weight:bold;">end</span></pre></div></div>

<p>But I wasn&#8217;t running Rails proper, and didn&#8217;t want to pull in the whole Rails boot sequence.  So the Rails::Initializer call didn&#8217;t work.  To do it manually, time zone config turns out it&#8217;s a 3 lines of setup&nbsp;calls:</p>

<div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;"><span style="color:#CC0066; font-weight:bold;">require</span> <span style="color:#996600;">'activerecord'</span>
<span style="color:#CC00FF; font-weight:bold;">Time</span>.<span style="color:#9900CC;">zone</span> = <span style="color:#996600;">&quot;Pacific Time (<span class="caps">US</span> <span class="amp">&amp;</span> Canada)&quot;</span>
<span style="color:#6666ff; font-weight:bold;">ActiveRecord::Base</span>.<span style="color:#9900CC;">time_zone_aware_attributes</span> = <span style="color:#0000FF; font-weight:bold;">true</span>
<span style="color:#6666ff; font-weight:bold;">ActiveRecord::Base</span>.<span style="color:#9900CC;">default_timezone</span> = <span style="color:#996600;">&quot;Pacific Time (<span class="caps">US</span> <span class="amp">&amp;</span> Canada)&quot;</span></pre></div></div>

<p>When you do that, time zone attributes work both going into the database, and coming back out. If you miss the last line, they&#8217;ll just not work coming out, which is a damn confusing thing to deal&nbsp;with.</p>
<p>Ohh, and one other thing I ran into when getting this setup is that <span class="caps">AR</span> pulls in Active Support, which in turn pulls in Builder (to hack xml support or something). Just watch out for that, you&#8217;ll get weird crashes if you don&#8217;t have builder installed.  Honestly, I just went and commented out the areas of Active Support that did it, I didn&#8217;t want builder&nbsp;anyway.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.gittr.com/index.php/archive/activerecord-timezones-without-rails/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Wink Blog Engine &#8211; Sinatra at it&#8217;s finest</title>
		<link>http://www.gittr.com/index.php/archive/wink-blog-engine-sinatra-at-its-finest/</link>
		<comments>http://www.gittr.com/index.php/archive/wink-blog-engine-sinatra-at-its-finest/#comments</comments>
		<pubDate>Sat, 24 May 2008 18:22:48 +0000</pubDate>
		<dc:creator>cschneid</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Rails]]></category>
		<category><![CDATA[Sinatra]]></category>

		<guid isPermaLink="false">http://www.gittr.com/?p=18</guid>
		<description><![CDATA[
Instead of writing a pastebin for semantic data like I had planned (still a good idea I&#8217;ll get to eventually), I&#8217;ve started working on a blog engine initially written by Ryan Tomayko called Wink. If you visit his blog, you can see the only live instance of Wink. He recently open sourced it with a little [...]]]></description>
			<content:encoded><![CDATA[<div>
<p>Instead of writing a pastebin for semantic data like I had planned (still a good idea I&#8217;ll get to eventually), I&#8217;ve started working on a blog engine initially written by Ryan Tomayko called Wink. If you visit his <a href="http://tomayko.com/">blog</a>, you can see the only live instance of Wink. He recently open sourced it with a little cajoling from the rest of the guys in&nbsp;#sinatra.</p>
<p>To get a feel for what it can do, check out Ryan&#8217;s post &#8220;<a href="http://tomayko.com/writings/administrative-debris">Administrative Debris</a>&#8221;. You can get a very good feel for what Wink is all about: simplicity, consistency, and&nbsp;ease.</p>
<p>Currently it&#8217;s not quite in a usable state. If you grab the 0.1 tag off of github, it should run for you, maybe with some tweaking or fighting with it. If you want to give it a shot, please do so, and report back on freenode.org either in #sinatra or #wink on how it&nbsp;went.</p>
<p>Beyond that, we&#8217;re going to solidify some of the wibbly-wobbly parts, add a few features, and document how to install and&nbsp;deploy.</p>
<p>I see Wink as being the shining example of what a great <a href="http://www.sinatrarb.com">sinatra</a> application can be, and I&#8217;m glad I got in on the ground floor of it&#8217;s open source&nbsp;life.</p>
<p>To grab the source code, or just follow development head over to github at Ryan&#8217;s <a href="http://github.com/rtomayko/wink/">Wink repository</a>, or <a href="http://github.com/cschneid/wink/">mine</a>.</p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.gittr.com/index.php/archive/wink-blog-engine-sinatra-at-its-finest/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Bought a Rails Book</title>
		<link>http://www.gittr.com/index.php/archive/bought-a-rails-book/</link>
		<comments>http://www.gittr.com/index.php/archive/bought-a-rails-book/#comments</comments>
		<pubDate>Wed, 07 May 2008 23:54:22 +0000</pubDate>
		<dc:creator>cschneid</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Rails]]></category>

		<guid isPermaLink="false">http://www.gittr.com/?p=10</guid>
		<description><![CDATA[Turns out I was lying in my last post about not wanting to buy a book about rails.  I ended up purchasing &#8220;Professional Ruby on Rails&#8221; from Amazon a few days ago.  Boy is one click shopping&#160;dangerous.
Twitter is the thing that changed my mind.  Several people came out saying that their pre-release [...]]]></description>
			<content:encoded><![CDATA[<p>Turns out I was lying in my last post about not wanting to buy a book about rails.  I ended up purchasing &#8220;<a href="http://www.amazon.com/Professional-Ruby-Rails-Programmer/dp/047022388X/">Professional Ruby on Rails</a>&#8221; from Amazon a few days ago.  Boy is one click shopping&nbsp;dangerous.</p>
<p>Twitter is the thing that changed my mind.  Several people came out saying that their pre-release versions were good, and so I just went and bought it.  Expect a mini-review once I get it read and&nbsp;absorbed.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.gittr.com/index.php/archive/bought-a-rails-book/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Learning Rails 2 &#8211; Resources</title>
		<link>http://www.gittr.com/index.php/archive/learning-rails-2/</link>
		<comments>http://www.gittr.com/index.php/archive/learning-rails-2/#comments</comments>
		<pubDate>Mon, 05 May 2008 03:48:29 +0000</pubDate>
		<dc:creator>cschneid</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Rails]]></category>
		<category><![CDATA[ruby on rails]]></category>

		<guid isPermaLink="false">http://www.gittr.com/?p=9</guid>
		<description><![CDATA[I&#8217;ve finally decided to update my knowledge of Rails to the newer Rails&#160;2.0.
All sorts of stuff has changed, and of course my book &#8220;Agile Web Development With Rails&#8221; isn&#8217;t updated yet.  Being cheap, I don&#8217;t feel like buying another book.  Here are the tutorials and blog posts I&#8217;ve run across.  Many of these are single [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve finally decided to update my knowledge of Rails to the newer Rails&nbsp;2.0.</p>
<p>All sorts of stuff has changed, and of course my book &#8220;Agile Web Development With Rails&#8221; isn&#8217;t updated yet.  Being cheap, I don&#8217;t feel like buying another book.  Here are the tutorials and blog posts I&#8217;ve run across.  Many of these are single purpose on something specific, but hopefully this helps you&nbsp;out.</p>
<p><strong>General</strong></p>
<ul>
<li>Akita On Rails has a 2 part series going over the new stuff in Rails 2, and how to use it. (<a href="http://www.akitaonrails.com/2007/12/12/rolling-with-rails-2-0-the-first-full-tutorial">part 1</a>), (<a href="http://www.akitaonrails.com/2007/12/12/rolling-with-rails-2-0-the-first-full-tutorial-part-2">part&nbsp;2</a>)</li>
<li><a href="http://railscasts.com/episodes;archive">Railscasts </a>- short, to the point screen casts going over various Rails features.  This has been going since Rails 1 days, but starting at episode 80, it&#8217;s all about Rails&nbsp;2.</li>
</ul>
<p><strong>Specs</strong></p>
<ul>
<li>Not easy to read, but RSpec <a href="http://rspec.rubyforge.org/documentation/rails/writing/">examples</a> for testing Models, Controllers, Views, and&nbsp;Helpers.</li>
</ul>
<p><strong>Fixtures</strong></p>
<ul>
<li><a href="http://m.onkey.org/2007/10/26/fixtures-go-foxy">Foxy Fixtures</a> - easily create has_many and belongs_to type relationships with no cross reference work actually in the&nbsp;fixture.</li>
</ul>
<p>That&#8217;s what I&#8217;ve found so far, I know there are a bunch more great resources and posts out there to find.  I&#8217;ll write follow-up articles as I find the juicy tidbits out&nbsp;there.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.gittr.com/index.php/archive/learning-rails-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
