<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -14,15 +14,15 @@ Define your ActiveRecord default attributes like this:
 
 &lt;pre&gt;&lt;code&gt;en-US:
   activerecord:
-    global-attributes:
-      login: &quot;Login&quot;
     attributes:
+      _all:
+        login: &quot;Login&quot;
       admin:
         login: &quot;Custom Login&quot;
       user:
         name: &quot;Name&quot;&lt;/code&gt;&lt;/pre&gt;
 
-Then use the I18n API as usual. If an attribute for a model is not found, it will be searched in the global attributes.
+Then use the I18n API as usual. If an attribute for a model is not found, it will be searched in _all atributes.
 
 h2. License
 </diff>
      <filename>README.textile</filename>
    </modified>
    <modified>
      <diff>@@ -1,17 +1,15 @@
-module I18n
+ActiveRecord::Base.class_eval do
+
+   def self.human_attribute_name(attribute_key_name, options = {})
+     defaults = self_and_descendents_from_active_record.map do |klass|
+       :&quot;#{klass.name.underscore}.#{attribute_key_name}&quot;
+     end
+     defaults &lt;&lt; &quot;_all.#{attribute_key_name.to_s}&quot;.to_sym
+     defaults &lt;&lt; options[:default] if options[:default]
+     defaults.flatten!
+     defaults &lt;&lt; attribute_key_name.humanize
+     options[:count] ||= 1
+     I18n.translate(defaults.shift, options.merge(:default =&gt; defaults, :scope =&gt; [:activerecord, :attributes]))
+   end
 
-  class &lt;&lt; self
-    def translate(key, options = {})
-      locale = options.delete(:locale) || I18n.locale
-      if options[:default].nil? &amp;&amp; key.to_s.include?(&quot;activerecord.attributes.&quot;)
-        options[:default] = &quot;activerecord.global-attributes.#{key.to_s.split(&quot;.&quot;).last}&quot;.to_sym
-      end
-      backend.translate(locale, key, options)
-    rescue I18n::ArgumentError =&gt; e
-      raise e if options[:raise]
-      send(@@exception_handler, e, locale, key, options)
-    end
-    alias :t :translate
-  end
-  
 end</diff>
      <filename>lib/activerecord_i18n_defaults.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,27 +1,24 @@
 require File.dirname(__FILE__) + '/spec_helper.rb'
 
-describe I18n do
+class Admin &lt; ActiveRecord::Base
+end
+
+class User &lt; ActiveRecord::Base
+end
+
+describe &quot;Human attribute name&quot; do
 
   before :all do
     I18n.load_path &lt;&lt; File.dirname(__FILE__) + &quot;/locale.yml&quot;
     I18n.default_locale = 'aa-BB'
   end
 
-  it &quot;should lookup the translation key in global attributes when specified is not found&quot; do
-    I18n.t('activerecord.attributes.user.login').should eql(I18n.t('activerecord.global-attributes.login'))
-  end
-  
-  it &quot;should translate normally when key is found&quot; do
-    I18n.t('activerecord.attributes.admin.login').should eql(&quot;custom login&quot;)
-  end
-  
-  it &quot;should not lost default translation&quot; do
-    default_value = 'ew igfwej giowewe'
-    I18n.t('im.do.not.exist', :default =&gt; default_value).should eql(default_value)
+  it &quot;should lookup human attribute in '_all' attribute when specified is not found&quot; do
+    User.human_attribute_name('login').should eql(I18n.t('activerecord.attributes._all.login'))
   end
   
-  it &quot;should not lost the feature of working with symbols&quot; do
-    I18n.t(:hey).should eql(&quot;jo&quot;)
+  it &quot;should get human attribute when found&quot; do
+    Admin.human_attribute_name('login').should eql(I18n.t('activerecord.attributes.admin.login'))
   end
 
 end</diff>
      <filename>spec/activerecord_i18n_defaults_spec.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,8 +1,8 @@
 aa-BB:
   hey: 'jo'
   activerecord:
-    global-attributes:
-      login: &quot;global login&quot;
     attributes:
+      _all:
+        login: &quot;global login&quot;
       admin:
         login: &quot;custom login&quot;</diff>
      <filename>spec/locale.yml</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>88e83eed3b4d7aa475a6739d80514893f03a3ac8</id>
    </parent>
  </parents>
  <author>
    <name>Diego Carrion</name>
    <email>dcrec1@dcrec1.(none)</email>
  </author>
  <url>http://github.com/dcrec1/activerecord_i18n_defaults/commit/8544bc968e6ecb359ded930968baf6c85aa9d239</url>
  <id>8544bc968e6ecb359ded930968baf6c85aa9d239</id>
  <committed-date>2008-12-01T05:07:15-08:00</committed-date>
  <authored-date>2008-12-01T05:07:15-08:00</authored-date>
  <message>work is done at human_attribute_name method now</message>
  <tree>af02520c93a8379fdb40e60d0b932834242bc28b</tree>
  <committer>
    <name>Diego Carrion</name>
    <email>dcrec1@dcrec1.(none)</email>
  </committer>
</commit>
