<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -80,6 +80,37 @@ Notice how the keys correspond to the user names.  FixtureScenariosBuilder will
 to an extent, to guess the name of your key.  If it can't figure it out,
 keys will be the standard user_001, user_002, etc format.
 
+Thanks to Paul Cantrell's handywork, custom key names are supported. Simply use the
++name+ method:
+
+  scenario :foo do
+    name &quot;small_red_widget&quot;, Widget.create(:size =&gt; 'small', :color =&gt; 'red')
+    name &quot;big_blue_widget&quot;,  Widget.create(:size =&gt; 'big',   :color =&gt; 'blue')
+  end
+
+Another option is to assign your records to instance variables, then call +names_from_ivars+
+at the conclusion of your +scenario+ block.
+
+  scenario :foo do
+    @small_red_widget = Widget.create(:size =&gt; 'small', :color =&gt; 'red')
+    @big_blue_widget  = Widget.create(:size =&gt; 'big',   :color =&gt; 'blue')
+
+   names_from_ivars!
+  end
+
+The above produces the following YAML:
+
+  small_red_widget:
+    size: small
+    color: red
+    updated_at: 2007-12-27 10:09:05
+    created_at: 2007-12-27 10:09:05
+  big_blue_widget:
+    size: big
+    color: blue
+    updated_at: 2007-12-27 10:19:23
+    created_at: 2007-12-27 10:19:23
+
 On subsequent test runs this YAML file will not be needlessly re-created.  YAML
 files will only be re-generated when the &lt;tt&gt;scenarios.rb&lt;/tt&gt; file is 
 modified.</diff>
      <filename>README</filename>
    </modified>
    <modified>
      <diff>@@ -33,6 +33,7 @@ class ScenarioBuilder
 
     @block    = block
     @children = []
+    @custom_names = {}
   end
 
   def validate_parent(scenario)
@@ -88,13 +89,30 @@ class ScenarioBuilder
   def skip_tables
     %w( schema_info )
   end
+  
+  def name(custom_name, model_object)
+    key = [model_object.class.name, model_object.id]
+    @custom_names[key] = custom_name
+    model_object
+  end
+  
+  def names_from_ivars!
+    instance_values.each do |var, value|
+      name(var, value) if value.is_a? ActiveRecord::Base
+    end
+  end
 
+  def record_name(record_hash)
+    key = [@table_name.classify, record_hash['id'].to_i]
+    @record_names &lt;&lt; (@custom_names[key] || inferred_record_name(record_hash) )
+    name
+  end
+  
   def inferred_record_name(record_hash)
     @@record_name_fields.each do |try|
       if name = record_hash[try]
         inferred_name = name.underscore.gsub(/\W/, ' ').squeeze(' ').tr(' ', '_')
-        count = @inferred_names.select { |name| name == inferred_name }.size
-        @inferred_names &lt;&lt; inferred_name
+        count = @record_names.select { |name| name == inferred_name }.size
         return count.zero? ? inferred_name : &quot;#{inferred_name}_#{count}&quot;
       end
     end
@@ -110,9 +128,9 @@ class ScenarioBuilder
       next files if rows.empty?
 
       @row_index      = '000'
-      @inferred_names = []
+      @record_names = []
       fixture_data = rows.inject({}) do |hash, record|
-        hash.merge(inferred_record_name(record) =&gt; record)
+        hash.merge(record_name(record) =&gt; record)
       end
 
       write_fixture_file fixture_data</diff>
      <filename>lib/scenario_builder.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>fc1ef6efa12c1b3cbd38af70a550511ac2dcdb2f</id>
    </parent>
  </parents>
  <author>
    <name>Chris Wanstrath</name>
    <email>chris@ozmm.org</email>
  </author>
  <url>http://github.com/defunkt/fixture_scenarios_builder/commit/212be98be4a96b242e40afa5b5139e581a528e99</url>
  <id>212be98be4a96b242e40afa5b5139e581a528e99</id>
  <committed-date>2007-12-27T14:40:32-08:00</committed-date>
  <authored-date>2007-12-27T14:40:32-08:00</authored-date>
  <message>fixture_scenarios_builder: custom names [Paul Cantrell]</message>
  <tree>dc45022552572d10db2ccea9a1ac43d806596d71</tree>
  <committer>
    <name>Chris Wanstrath</name>
    <email>chris@ozmm.org</email>
  </committer>
</commit>
