<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -31,6 +31,11 @@ To create a record using these scopes, just do it like normal:
   
 Voila!
 
+The created scope has a method that returns the attribute hash:
+
+	User.valid.form
+	# =&gt; {:login =&gt; &quot;hello&quot;}
+
 ==== Parameters
 
 Just like in normal +named_scope+ usage, you can pass parameters to these scopes:</diff>
      <filename>README.rdoc</filename>
    </modified>
    <modified>
      <diff>@@ -12,7 +12,11 @@ module Foundry
       raise ArgumentError, &quot;You need to provide a definition or a lambda/block definition!&quot;
     end
 
-    model.named_scope name, definition
+    model.named_scope(name, definition) do
+      def form
+        proxy_options[:conditions]
+      end
+    end
   end
 
   class &lt;&lt;self</diff>
      <filename>lib/foundry.rb</filename>
    </modified>
    <modified>
      <diff>@@ -60,4 +60,20 @@ class FoundryTest &lt; Test::Unit::TestCase
       end
     end
   end
+
+  context 'The scope' do
+    it &quot;should return the defining hash&quot; do
+      f = {:title =&gt; 'Untitled'}
+      Foundry.factory(Record, :untitled, f)
+      assert Record.untitled.respond_to?('form')
+      assert Record.untitled.form.is_a?(Hash)
+      assert_equal f, Record.untitled.form
+    
+      Foundry.factory(Record, :entitled) do |n|
+        {:conditions =&gt; {:title =&gt; &quot;Title #{n}&quot;}}
+      end
+      assert_equal( {:title =&gt; 'Title IX'}, Record.entitled('IX').form )
+    end
+  end
+
 end</diff>
      <filename>test/foundry_test.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>8dd04d69f1863cc1d36020a366ae23d2e0a425a4</id>
    </parent>
  </parents>
  <author>
    <name>tnp</name>
    <email>tnp@cruzio.com</email>
  </author>
  <url>http://github.com/jeremymcanally/foundry/commit/0157f3d3ba0169e88fa58b30db91709f0626384b</url>
  <id>0157f3d3ba0169e88fa58b30db91709f0626384b</id>
  <committed-date>2009-05-11T14:56:34-07:00</committed-date>
  <authored-date>2009-04-21T16:35:41-07:00</authored-date>
  <message>add method to return scope's attribute hash

Signed-off-by: Jeremy McAnally &lt;jeremymcanally@gmail.com&gt;</message>
  <tree>804a1a2f03fad5865293f7237467d542b96b85f9</tree>
  <committer>
    <name>Jeremy McAnally</name>
    <email>jeremymcanally@gmail.com</email>
  </committer>
</commit>
