<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -1,22 +1,19 @@
-HasDetails
-==========
+= HasDetails
 
 HasDetails allows you to store a large amount of (optional) attributes for any model's instance in a serialized column. It takes care of adding convenience methods to your model, and verifies that the value being assigned is indeed (one of) the type(s) required for that attribute.
 
-Example
-=======
+= Example
 
-class User &lt;&lt; ActiveRecord::Base
-	has_details :firstname =&gt; String,
-	            :lastname =&gt; String,
-	            :birthday =&gt; Date,
-	            :gender =&gt; [:male, :female]
-end
+  class User &lt;&lt; ActiveRecord::Base
+    has_details :firstname =&gt; String,
+                :lastname =&gt; String,
+                :birthday =&gt; Date,
+                :gender =&gt; [:male, :female]
+  end
+  
+  john = User.find(1)
+  john.birthday = 5.years.ago
+  john.gender
+  =&gt; :male
 
-john = User.find(1)
-john.birthday = 5.years.ago
-john.gender
-=&gt; :male
-
-=======
 Copyright (c) 2008 Marten Veldthuis, released under the MIT license</diff>
      <filename>README</filename>
    </modified>
    <modified>
      <diff>@@ -4,15 +4,41 @@ module HasDetails
     base.send(:include, InstanceMethods)
   end
   
+  # HasDetails allows you to store a large amount of (optional) attributes for any model's instance in a 
+  # serialized column. It takes care of adding convenience methods to your model, and verifies that the 
+  # value being assigned is indeed (one of) the type(s) required for that attribute.
+  # 
+  # Example:
+  # 
+  #   class User &lt;&lt; ActiveRecord::Base
+  #     has_details :column =&gt; :extended_attributes,
+  #                 :firstname =&gt; String,
+  #                 :lastname =&gt; String,
+  #                 :birthday =&gt; Date,
+  #                 :gender =&gt; [:male, :female]
+  #   end
+  #   
+  #   john = User.find(1)
+  #   john.birthday = 5.years.ago
+  #   john.gender
+  #   =&gt; :male
   module ClassMethods
+    
+    # Configuration options are:
+    #
+    # * +column+ - Specifies the column name to use for storing the serialized attributes. This column will automatically be set to serialize in Rails. The default value is :details.
+    # 
+    # The rest of the configuration options is the set of attributes that will be saved in the +column+. Valid formats are:
+    # * +:field =&gt; ClassName+ (values assigned to +field+ must be of class +ClassName+)
+    # * +:field =&gt; [:symbol, :othersymbol]+  (values assigned to +field+ must be included in the array given)
     def has_details(options = {})
-      configuration = { }
+      configuration = { :column =&gt; :details}
       configuration.update(options) if options.is_a?(Hash)
       
       raise(ArgumentError, &quot;You must be supply at least one field in the configuration hash&quot;) unless configuration.keys.size &gt; 0
-      raise(Exception, &quot;A details column must be present in the database for this plugin.&quot;) unless columns.include?(:details)
+      raise(Exception, &quot;A #{configuration[:column]} column must be present in the database for this plugin.&quot;) unless columns.include?(:details)
       
-      serialize :details, Hash
+      serialize configuration[:column], Hash
       
       configuration.each do |f,t|
 
@@ -21,21 +47,20 @@ module HasDetails
         
         puts &lt;&lt;-EOV
           def #{f}
-            @details[:#{f}]
+            details ||= {}
+            details[:#{f}]
           end
           
           def #{f}=(val)
             #{exception_code}
-            @details[:#{f}] = val
+
+            details ||= {}
+            details[:#{f}] = val
           end
         EOV
       end
       
     end
   end
-  
-  module InstanceMethods
-    
-  end
-  
+
 end
\ No newline at end of file</diff>
      <filename>lib/has_details.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>b8a78823feafe8a5bf2fd3228edbeea169677d78</id>
    </parent>
  </parents>
  <author>
    <name>Marten Veldthuis</name>
    <email>marten@veldthuis.com</email>
  </author>
  <url>http://github.com/marten/has_details/commit/651e166874f2ea0dc2f43cf7cedff06ed70b3df2</url>
  <id>651e166874f2ea0dc2f43cf7cedff06ed70b3df2</id>
  <committed-date>2008-06-23T12:17:00-07:00</committed-date>
  <authored-date>2008-06-23T11:25:10-07:00</authored-date>
  <message>documentation updates, bugfixes</message>
  <tree>718ffc147985bdf4c2bcca27ed55133360e2dd6e</tree>
  <committer>
    <name>Marten Veldthuis</name>
    <email>marten@veldthuis.com</email>
  </committer>
</commit>
