<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>test/model/active_record/inheritable_model_locale_test.rb</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -41,11 +41,11 @@ module Globalize
           end
 
           def locale=(locale)
-            @@locale = locale
+            write_inheritable_attribute(:locale, locale)
           end
           
           def locale
-            (defined?(@@locale) &amp;&amp; @@locale) || I18n.locale
+            read_inheritable_attribute(:locale) || I18n.locale
           end          
         end
 </diff>
      <filename>lib/globalize/model/active_record/translated.rb</filename>
    </modified>
    <modified>
      <diff>@@ -4,6 +4,7 @@ class Post &lt; ActiveRecord::Base
 end
 
 class Blog &lt; ActiveRecord::Base
+  translates :description
   has_many :posts, :order =&gt; 'id ASC'
 end
 </diff>
      <filename>test/data/post.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,8 +1,14 @@
 ActiveRecord::Schema.define do
   
   create_table :blogs, :force =&gt; true do |t|
-    t.string      :description
   end
+  
+  create_table :blog_translations, :force =&gt; true do |t|
+    t.string :locale
+    t.references :blog
+    t.string  :description
+  end
+  
 
   create_table :posts, :force =&gt; true do |t|
     t.references :blog</diff>
      <filename>test/data/schema.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>e99190ec95e0989b0a21600f4a7d0f400edd825b</id>
    </parent>
  </parents>
  <author>
    <name>dagi3d</name>
    <login>dagi3d</login>
    <email>borjam@dagi3d.net</email>
  </author>
  <url>http://github.com/dagi3d/globalize2/commit/5026a20fcb975655d5f0568ca3b6b82d449c0fe7</url>
  <id>5026a20fcb975655d5f0568ca3b6b82d449c0fe7</id>
  <committed-date>2009-03-05T15:40:25-08:00</committed-date>
  <authored-date>2009-03-05T15:40:25-08:00</authored-date>
  <message>Using inheritable attributes for the model locale instead static vars so that changing a class locale doesn't affect the other classes</message>
  <tree>e71aedf27cbb545dc4e13e221553038b68058800</tree>
  <committer>
    <name>dagi3d</name>
    <login>dagi3d</login>
    <email>borjam@dagi3d.net</email>
  </committer>
</commit>
