<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -105,13 +105,11 @@ To setup, you really just need to create the config table:
   class AddConfigTable &lt; ActiveRecord::Migration
     def self.up
       create_table :config do |t|
-      
         t.references    :associated, :polymorphic =&gt; true
-        
         t.string        :namespace
         t.string        :key,         :limit =&gt; 40,     :null =&gt; false
         t.string        :value
-      
+        t.string        :data_type,   :limit =&gt; 40
       end
     end
  </diff>
      <filename>README.rdoc</filename>
    </modified>
    <modified>
      <diff>@@ -24,9 +24,29 @@ class ConfigurationHash &lt; ActiveRecord::Base
   
   def value=(param)
     write_attribute :value, param.to_s
+    if respond_to?(:data_type)
+      type = case param
+      when TrueClass, FalseClass    : 'bool'
+      when Float                    : 'float'
+      when Integer, Fixnum          : 'integer'
+      else 'string'
+      end
+      write_attribute :data_type, type
+    end
   end
   
   def value
+    return value_without_datatype unless respond_to?(:data_type)
+    case data_type
+    when 'bool'     : self[:value] == 'true'
+    when 'float'    : self[:value].to_f
+    when 'integer'  : self[:value].to_i
+    else self[:value]
+    end
+  end
+  
+  def value_without_datatype
+    ActiveSupport::Deprecation.warn(&quot;Add a data_type column to your Configurator table to store object types&quot;,caller)
     if key.ends_with? &quot;?&quot;
       read_attribute(:value) == &quot;true&quot;
     else</diff>
      <filename>lib/configuration_hash.rb</filename>
    </modified>
    <modified>
      <diff>@@ -17,11 +17,13 @@ class ConfiguratorTest &lt; Test::Unit::TestCase
       assert_equal 'New York', @user.config[:favorite_city]
     end
 
-    should 'test for TRUE values when supplying an inquiry key' do
-      @user.config[:likes_cats?] = 'true'
-      assert_equal true, @user.config[:likes_cats?]
-      @user.config[:likes_dogs?] = true
-      assert_equal true, @user.config[:likes_dogs?]
+    should 'test for data types being preserved' do
+      @user.config[:age] = 50
+      assert_instance_of Fixnum, @user.config[:age]
+      @user.config[:likes_cats?] = true
+      assert_instance_of TrueClass, @user.config[:likes_cats?]
+      @user.config[:account_balance] = 123.45
+      assert_instance_of Float, @user.config[:account_balance]
     end
 
     should 'handle two levels of namespaces as keys' do</diff>
      <filename>test/configurator_test.rb</filename>
    </modified>
    <modified>
      <diff>@@ -32,6 +32,7 @@ def setup_db
         t.string        :namespace
         t.string        :key,         :limit =&gt; 40,     :null =&gt; false
         t.string        :value
+        t.string        :data_type,   :limit =&gt; 40
       end
     
       connection.create_table :users, :force =&gt; true do |t|</diff>
      <filename>test/helper.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>037d02e85a9ca7b66fdd92ecd53eed86828ee4b9</id>
    </parent>
  </parents>
  <author>
    <name>Brennan Dunn</name>
    <email>me@brennandunn.com</email>
  </author>
  <url>http://github.com/brennandunn/configurator/commit/c095996fc3d2f59f31d6008a8ee7442fc2be8af5</url>
  <id>c095996fc3d2f59f31d6008a8ee7442fc2be8af5</id>
  <committed-date>2009-02-18T07:33:44-08:00</committed-date>
  <authored-date>2009-02-18T07:33:44-08:00</authored-date>
  <message>Added data_type column, which will allow for retrieving the original type of a value stored with Configurator.</message>
  <tree>cda8d9bd964216173d3b03065a603bf8ca441308</tree>
  <committer>
    <name>Brennan Dunn</name>
    <email>me@brennandunn.com</email>
  </committer>
</commit>
