<?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>Ruby On Rails Blog &#187; activerecord</title>
	<atom:link href="http://www.mendable.com/tag/activerecord/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.mendable.com</link>
	<description>Mendable.com - Essential Reading for Ruby on Rails Developers</description>
	<lastBuildDate>Tue, 27 Jul 2010 19:38:46 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Polymorphic Single Table Inheritance (STI)</title>
		<link>http://www.mendable.com/polymorphic-single-table-inheritance-sti/</link>
		<comments>http://www.mendable.com/polymorphic-single-table-inheritance-sti/#comments</comments>
		<pubDate>Tue, 30 Mar 2010 19:47:26 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[activerecord]]></category>

		<guid isPermaLink="false">http://www.mendable.com/?p=244</guid>
		<description><![CDATA[Migration:

    create_table :addresses do &#124;t&#124;
      ....
      t.references :addressable, :polymorphic => true
      t.string :type
      t.timestamps
    end
Address Models:
class Address < ActiveRecord::Base
    belongs_to :addressable, :polymorphic => true
end
class InvoiceAddress < [...]]]></description>
		<wfw:commentRss>http://www.mendable.com/polymorphic-single-table-inheritance-sti/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Rails: Black Box Testing Complex Models</title>
		<link>http://www.mendable.com/rails-black-box-testing-complex-models/</link>
		<comments>http://www.mendable.com/rails-black-box-testing-complex-models/#comments</comments>
		<pubDate>Sat, 04 Jul 2009 18:31:27 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Rails]]></category>
		<category><![CDATA[Testing]]></category>
		<category><![CDATA[activerecord]]></category>
		<category><![CDATA[black box]]></category>
		<category><![CDATA[interesting ideas]]></category>
		<category><![CDATA[polymorphic]]></category>
		<category><![CDATA[scalable]]></category>
		<category><![CDATA[tdd]]></category>
		<category><![CDATA[white box]]></category>

		<guid isPermaLink="false">http://www.mendable.com/?p=57</guid>
		<description><![CDATA[In this article I will show you how you can perform complete end-to-end testing of very complex models using a method called Black Box Testing. I will demonstrate a solution that scales to hundreds of tests and upwards, without having to write any additional code or fixtures for each one.
The method I am going to [...]]]></description>
		<wfw:commentRss>http://www.mendable.com/rails-black-box-testing-complex-models/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Understand Named_scope in 60 seconds</title>
		<link>http://www.mendable.com/understand-named_scope-in-60-seconds/</link>
		<comments>http://www.mendable.com/understand-named_scope-in-60-seconds/#comments</comments>
		<pubDate>Sun, 28 Jun 2009 17:11:16 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Rails]]></category>
		<category><![CDATA[activerecord]]></category>
		<category><![CDATA[named_scope]]></category>

		<guid isPermaLink="false">http://www.mendable.com/?p=141</guid>
		<description><![CDATA[Named scope was introduced in Rails 2.x, it allows you to filter a selection of records easily and repeatedly, without having to write finder SQL all the time.

class Customer < ActiveRecord::Base
  has_many :carts
end

class Cart < ActiveRecord::Base
  belongs_to :customer
  named_scope :completed, :conditions => ["NOT ISNULL(completed_at)"]
end


Example of self-model scoping and finding:

# All completed carts [...]]]></description>
		<wfw:commentRss>http://www.mendable.com/understand-named_scope-in-60-seconds/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>FIX: TypeError: wrong argument type nil (expected Module)</title>
		<link>http://www.mendable.com/fix-typeerror-wrong-argument-type-nil-expected-module/</link>
		<comments>http://www.mendable.com/fix-typeerror-wrong-argument-type-nil-expected-module/#comments</comments>
		<pubDate>Wed, 29 Apr 2009 16:35:34 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Rails]]></category>
		<category><![CDATA[actionmailer]]></category>
		<category><![CDATA[activerecord]]></category>
		<category><![CDATA[ar_mailer]]></category>

		<guid isPermaLink="false">http://mendable.wordpress.com/2009/04/29/fix-typeerror-wrong-argument-type-nil-expected-module/</guid>
		<description><![CDATA[If you were using an old ARMailer gem, then removed it and installed another, more frequently updated version, (eg, &#8220;adzap-ar_mailer&#8221; from Github), you might receive the following error when attempting to send mail:
TypeError: wrong argument type nil (expected Module)
from /usr/lib/ruby/gems/1.8/gems/actionmailer-2.3.2/lib/action_mailer/helpers.rb:109:in `extend&#8217;
from /usr/lib/ruby/gems/1.8/gems/actionmailer-2.3.2/lib/action_mailer/helpers.rb:109:in `initialize_template_class&#8217;
from /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/active_support/core_ext/object/misc.rb:39:in `returning&#8217;
from /usr/lib/ruby/gems/1.8/gems/actionmailer-2.3.2/lib/action_mailer/helpers.rb:108:in `initialize_template_class&#8217;
from /usr/lib/ruby/gems/1.8/gems/actionmailer-2.3.2/lib/action_mailer/base.rb:564:in `render&#8217;
from /usr/lib/ruby/gems/1.8/gems/actionmailer-2.3.2/lib/action_mailer/base.rb:552:in `render_message&#8217;
from /usr/lib/ruby/gems/1.8/gems/actionmailer-2.3.2/lib/action_mailer/base.rb:493:in `create!&#8217;
from /usr/lib/ruby/gems/1.8/gems/actionmailer-2.3.2/lib/action_mailer/base.rb:452:in `initialize&#8217;
from [...]]]></description>
		<wfw:commentRss>http://www.mendable.com/fix-typeerror-wrong-argument-type-nil-expected-module/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
