<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/2.3.1" -->
<rss version="0.92">
<channel>
	<title>Ambethia</title>
	<link>http://ambethia.com</link>
	<description>The journal and personal website of Jason L Perry</description>
	<lastBuildDate>Mon, 23 Jun 2008 16:06:31 +0000</lastBuildDate>
	<docs>http://backend.userland.com/rss092</docs>
	<language>en</language>
	
	<item>
		<title>Git Railed</title>
		<description>	This is just a little something I threw together this weekend to make life a little easier. git-railed is a simple script that creates a new rails app, initializes a new git repository, moving the db config and setting up the ignores for you. You can use it as a ...</description>
		<link>http://ambethia.com/feeder/?FeederAction=clicked&amp;feed=Articles+%28rss%29&amp;seed=http%3A%2F%2Fambethia.com%2F2008%2F06%2F23%2Fgit-railed%2F&amp;seed_title=Git+Railed</link>
			</item>
	<item>
		<title>Makes for some ugly SQL, but&#8230;</title>
		<description>	
class Listing < ActiveRecord::Base
  belongs_to :book
  belongs_to :guide

  def (other)
    self.guide.name  other.guide.name
  end
end

	Book.find(1).listings.map{ &#124;l&#124; l.guide.name }
	
		=> [&#8220;XYZZY&#8221;, &#8220;BAR&#8221;, &#8220;FOO&#8221;, &#8220;QUUX&#8221;]
	

	Book.find(1).listings.sort.map{ &#124;l&#124; l.guide.name }
	
		=> [&#8220;BAR&#8221;, &#8220;FOO&#8221;, &#8220;QUUX&#8221;, &#8220;XYZZY&#8221;]
	


	Nice. </description>
		<link>http://ambethia.com/feeder/?FeederAction=clicked&amp;feed=Articles+%28rss%29&amp;seed=http%3A%2F%2Fambethia.com%2F2008%2F06%2F19%2Fmakes-for-some-ugly-sql-but%2F&amp;seed_title=Makes+for+some+ugly+SQL%2C+but%26%238230%3B</link>
			</item>
	<item>
		<title>I can do anything</title>
		<description>I can do anything in quicksilver&#8230; I can probably kill you through Quicksilver
- Chris Rohde </description>
		<link>http://ambethia.com/feeder/?FeederAction=clicked&amp;feed=Articles+%28rss%29&amp;seed=http%3A%2F%2Fambethia.com%2F2008%2F04%2F07%2Fi-can-do-anything%2F&amp;seed_title=I+can+do+anything</link>
			</item>
	<item>
		<title>You can&#8217;t cache that</title>
		<description>	&#60;Jason L Perry&#62; the addresses dont change, they dont need to be geocoded every time
&#60;Jason L Perry&#62; wtf
&#60;K. Adam Christensen&#62; no&#8230;..shifting tectonic plates
&#60;K. Adam Christensen&#62; don&#x27;t you watch discovery?
&#60;K. Adam Christensen&#62; fucking n00b
&#60;K. Adam Christensen&#62; you can&#x27;t cache that </description>
		<link>http://ambethia.com/feeder/?FeederAction=clicked&amp;feed=Articles+%28rss%29&amp;seed=http%3A%2F%2Fambethia.com%2F2008%2F03%2F19%2Fyou-cant-cache-that%2F&amp;seed_title=You+can%26%238217%3Bt+cache+that</link>
			</item>
	<item>
		<title>MicroTip #1</title>
		<description>	
	
		Prevent those race conditions in RSpec specs.
	
time_now = Time.now
Time.stub!(:now).and_return(time_now)
 </description>
		<link>http://ambethia.com/feeder/?FeederAction=clicked&amp;feed=Articles+%28rss%29&amp;seed=http%3A%2F%2Fambethia.com%2F2008%2F01%2F23%2Fmicrotip-1%2F&amp;seed_title=MicroTip+%231</link>
			</item>
	<item>
		<title>Exclusive Conditions for ActiveRecord&#8217;s has_many</title>
		<description>	I&#8217;ll start with some code.

	
class User < ActiveRecord::Base
  has_many :things, :exclusive_conditions => %q(`things`.user_id = #{id} OR #{admin?})
end


	Assuming, we have 2 users, Alice and Bob.

	
user = User.find_by_username(&#8220;alice&#8221;) # => Alice is an admin.
user.id # => 1
thing = user.things.find_by_name(&#8220;Bob&#8217;s Thing&#8221;)
thing.user_id # => 2, It&#8217;s still bobs thing.


	Now in my controller&#8217;s I ...</description>
		<link>http://ambethia.com/feeder/?FeederAction=clicked&amp;feed=Articles+%28rss%29&amp;seed=http%3A%2F%2Fambethia.com%2F2007%2F11%2F28%2Fexclusive-conditions-for-activerecords-has_many%2F&amp;seed_title=Exclusive+Conditions+for+ActiveRecord%26%238217%3Bs+has_many</link>
			</item>
	<item>
		<title>attr_protected my left foot.</title>
		<description>	I don&#8217;t like the idea of attr_protected, and attr_accessible in ActiveRecord.

	
		They makes me put more code in the controller, and sometimes worse, I&#8217;m forced to express model ideas in the controller.
	
	
		They make me put things in the model that should be handled by the controller.
	

	From the Rails API docs:

This is ...</description>
		<link>http://ambethia.com/feeder/?FeederAction=clicked&amp;feed=Articles+%28rss%29&amp;seed=http%3A%2F%2Fambethia.com%2F2007%2F11%2F09%2Fattr_protected-my-left-foot%2F&amp;seed_title=attr_protected+my+left+foot.</link>
			</item>
	<item>
		<title>Using assert_select outside of the controller context</title>
		<description>	Testing your Rails helpers in an isolated context is made a lot easier with Geoffrey Grosenbach&#8217;s HelperTestCases. One thing however is still missing. assert_select is great for cutting through the response bodies in your functional and integration tests. Here&#8217;s how to use it outside those contexts:

	
require File.dirname(__FILE__) + &#8216;/../../test_helper&#8217;
require &#8216;ostruct&#8217;

	class ...</description>
		<link>http://ambethia.com/feeder/?FeederAction=clicked&amp;feed=Articles+%28rss%29&amp;seed=http%3A%2F%2Fambethia.com%2F2007%2F10%2F11%2Fassert_select%2F&amp;seed_title=Using+assert_select+outside+of+the+controller+context</link>
			</item>
	<item>
		<title>Backing up your RailsRumble repository</title>
		<description>	So you busted you butt all weekend, and want to make sure you can backup all the work, or import it (including the revision history) into your own subversion respository? We don&#8217;t have shell access to the subversion server, and an svnsync won&#8217;t work because we can&#8217;t access the root ...</description>
		<link>http://ambethia.com/feeder/?FeederAction=clicked&amp;feed=Articles+%28rss%29&amp;seed=http%3A%2F%2Fambethia.com%2F2007%2F09%2F10%2Fbacking-up-your-railsrumble-repository%2F&amp;seed_title=Backing+up+your+RailsRumble+repository</link>
			</item>
	<item>
		<title>RubyConf 2007</title>
		<description>	

	Registration has opened for RubyConf 2007 in Charlotte, and with my grandparent&#8217;s bed-and-breakfast just an hour away it looks like I&#8217;m in for some nice road-trippin-family-visiting-geekin-early-birthday fun in November. </description>
		<link>http://ambethia.com/feeder/?FeederAction=clicked&amp;feed=Articles+%28rss%29&amp;seed=http%3A%2F%2Fambethia.com%2F2007%2F09%2F06%2Frubyconf-2007%2F&amp;seed_title=RubyConf+2007</link>
			</item>
	<item>
		<title>The Direction of RailsForge</title>
		<description>	So far the responses to the survey have been overwhelmingly positive and encouraging. There has, however, been a few detractors with some noteworthy comments.

	The main complaint I&#8217;ve seen so far is from people getting the impression we want to somehow &#8220;reimplement&#8221; Rubyforge or create another repository for gems or plugins1. ...</description>
		<link>http://ambethia.com/feeder/?FeederAction=clicked&amp;feed=Articles+%28rss%29&amp;seed=http%3A%2F%2Fambethia.com%2F2007%2F07%2F05%2Fthe-direction-of-railsforge%2F&amp;seed_title=The+Direction+of+RailsForge</link>
			</item>
	<item>
		<title>Number One iPhone Annoyance</title>
		<description>	The alarm clock volume is the same as the ringer volume.

	This should NOT be.

	I had the ringer turned down last via the volume buttons on the side. Thankfully, I woke up on my own initiative just before the alarm went of. A few minutes later&#8230; a faint buzzing on the ...</description>
		<link>http://ambethia.com/feeder/?FeederAction=clicked&amp;feed=Articles+%28rss%29&amp;seed=http%3A%2F%2Fambethia.com%2F2007%2F07%2F05%2Fnumber-one-iphone-annoyance%2F&amp;seed_title=Number+One+iPhone+Annoyance</link>
			</item>
</channel>
</rss>
