<?xml version="1.0" encoding="UTF-8"?>
<ticket>
  <assigned-user-id type="integer">12160</assigned-user-id>
  <attachments-count type="integer">1</attachments-count>
  <closed type="boolean">true</closed>
  <created-at type="datetime">2008-09-16T20:44:46-04:00</created-at>
  <creator-id type="integer">12160</creator-id>
  <milestone-due-on type="datetime" nil="true"></milestone-due-on>
  <milestone-id type="integer" nil="true"></milestone-id>
  <number type="integer">80</number>
  <permalink>conditionally-choose-i18n-or-ar-for-error-messages</permalink>
  <priority type="integer">27966</priority>
  <project-id type="integer">5807</project-id>
  <raw-data type="binary" nil="true" encoding="base64"></raw-data>
  <state>committed</state>
  <tag>active_record_helper</tag>
  <title>Conditionally choose I18n or AR for error messages</title>
  <updated-at type="datetime">2008-09-19T21:53:37-04:00</updated-at>
  <user-id type="integer">12160</user-id>
  <user-name>Ryan McGeary</user-name>
  <creator-name>Ryan McGeary</creator-name>
  <assigned-user-name>Ryan McGeary</assigned-user-name>
  <url>http://thoughtbot.lighthouseapp.com/projects/5807/tickets/80</url>
  <original-body>To support edge Rails and a future Rails 2.2 release, the AR macro helpers should pull default expected error messages from `I18n.translate('active_record.error_messages')` instead of `ActiveRecord::Errors.default_error_messages`

This will avoid deprecation messages like this:

@@@
DEPRECATION WARNING: ActiveRecord::Errors.default_error_messages has been deprecated. Please use I18n.translate('active_record.error_messages').
@@@

To maintain backwards compatibility, fallback to `#default_error_messages` if `I18n` isn't defined.</original-body>
  <latest-body>To support edge Rails and a future Rails 2.2 release, the AR macro helpers should pull default expected error messages from `I18n.translate('active_record.error_messages')` instead of `ActiveRecord::Errors.default_error_messages`

This will avoid deprecation messages like this:

@@@
DEPRECATION WARNING: ActiveRecord::Errors.default_error_messages has been deprecated. Please use I18n.translate('active_record.error_messages').
@@@

To maintain backwards compatibility, fallback to `#default_error_messages` if `I18n` isn't defined.</latest-body>
  <original-body-html>&lt;div&gt;&lt;p&gt;To support edge Rails and a future Rails 2.2 release, the AR
macro helpers should pull default expected error messages from
&lt;code&gt;I18n.translate('active_record.error_messages')&lt;/code&gt; instead
of &lt;code&gt;ActiveRecord::Errors.default_error_messages&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;This will avoid deprecation messages like this:&lt;/p&gt;


&lt;pre&gt;&lt;code&gt;
DEPRECATION WARNING: ActiveRecord::Errors.default_error_messages has been deprecated. Please use I18n.translate('active_record.error_messages').
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;To maintain backwards compatibility, fallback to
&lt;code&gt;#default_error_messages&lt;/code&gt; if &lt;code&gt;I18n&lt;/code&gt; isn't
defined.&lt;/p&gt;&lt;/div&gt;</original-body-html>
  <versions type="array">
    <version type="Ticket::Version">
      <assigned-user-id type="integer">12160</assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body>To support edge Rails and a future Rails 2.2 release, the AR macro helpers should pull default expected error messages from `I18n.translate('active_record.error_messages')` instead of `ActiveRecord::Errors.default_error_messages`

This will avoid deprecation messages like this:

@@@
DEPRECATION WARNING: ActiveRecord::Errors.default_error_messages has been deprecated. Please use I18n.translate('active_record.error_messages').
@@@

To maintain backwards compatibility, fallback to `#default_error_messages` if `I18n` isn't defined.</body>
      <body-html>&lt;div&gt;&lt;p&gt;To support edge Rails and a future Rails 2.2 release, the AR
macro helpers should pull default expected error messages from
&lt;code&gt;I18n.translate('active_record.error_messages')&lt;/code&gt; instead
of &lt;code&gt;ActiveRecord::Errors.default_error_messages&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;This will avoid deprecation messages like this:&lt;/p&gt;


&lt;pre&gt;&lt;code&gt;
DEPRECATION WARNING: ActiveRecord::Errors.default_error_messages has been deprecated. Please use I18n.translate('active_record.error_messages').
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;To maintain backwards compatibility, fallback to
&lt;code&gt;#default_error_messages&lt;/code&gt; if &lt;code&gt;I18n&lt;/code&gt; isn't
defined.&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">false</closed>
      <created-at type="datetime">2008-09-16T20:44:46-04:00</created-at>
      <creator-id type="integer">12160</creator-id>
      <diffable-attributes type="yaml">--- {}

</diffable-attributes>
      <milestone-id type="integer" nil="true"></milestone-id>
      <number type="integer">80</number>
      <permalink>conditionally-choose-i18n-or-ar-for-error-messages</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">5807</project-id>
      <state>new</state>
      <tag>active_record_helper</tag>
      <title>Conditionally choose I18n or AR for error messages</title>
      <updated-at type="datetime">2008-09-16T20:44:50-04:00</updated-at>
      <user-id type="integer">12160</user-id>
      <user-name>Ryan McGeary</user-name>
      <creator-name>Ryan McGeary</creator-name>
      <assigned-user-name>Ryan McGeary</assigned-user-name>
      <url>http://thoughtbot.lighthouseapp.com/projects/5807/tickets/80</url>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">12160</assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body>http://github.com/thoughtbot/shoulda/commit/c60fa4be85af2c8273460c7fc0881847b4dbd171</body>
      <body-html>&lt;div&gt;&lt;p&gt;&lt;a href=&quot;http://github.com/thoughtbot/shoulda/commit/c60fa4be85af2c8273460c7fc0881847b4dbd171&quot;&gt;
http://github.com/thoughtbot/sho...&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">true</closed>
      <created-at type="datetime">2008-09-16T21:21:07-04:00</created-at>
      <creator-id type="integer">12160</creator-id>
      <diffable-attributes type="yaml">--- 
:state: new
</diffable-attributes>
      <milestone-id type="integer" nil="true"></milestone-id>
      <number type="integer">80</number>
      <permalink>conditionally-choose-i18n-or-ar-for-error-messages</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">5807</project-id>
      <state>committed</state>
      <tag>active_record_helper</tag>
      <title>Conditionally choose I18n or AR for error messages</title>
      <updated-at type="datetime">2008-09-16T21:21:08-04:00</updated-at>
      <user-id type="integer">12160</user-id>
      <user-name>Ryan McGeary</user-name>
      <creator-name>Ryan McGeary</creator-name>
      <assigned-user-name>Ryan McGeary</assigned-user-name>
      <url>http://thoughtbot.lighthouseapp.com/projects/5807/tickets/80</url>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">12160</assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body>It's hard to keep up with Rails!

What about this stray use of default_error_messages?

http://github.com/thoughtbot/shoulda/tree/master/lib/shoulda/active_record/assertions.rb#L60</body>
      <body-html>&lt;div&gt;&lt;p&gt;It's hard to keep up with Rails!&lt;/p&gt;
&lt;p&gt;What about this stray use of default_error_messages?&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://github.com/thoughtbot/shoulda/tree/master/lib/shoulda/active_record/assertions.rb#L60&quot;&gt;
http://github.com/thoughtbot/sho...&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">true</closed>
      <created-at type="datetime">2008-09-16T21:49:05-04:00</created-at>
      <creator-id type="integer">12160</creator-id>
      <diffable-attributes type="yaml">--- {}

</diffable-attributes>
      <milestone-id type="integer" nil="true"></milestone-id>
      <number type="integer">80</number>
      <permalink>conditionally-choose-i18n-or-ar-for-error-messages</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">5807</project-id>
      <state>committed</state>
      <tag>active_record_helper</tag>
      <title>Conditionally choose I18n or AR for error messages</title>
      <updated-at type="datetime">2008-09-16T21:49:08-04:00</updated-at>
      <user-id type="integer">17465</user-id>
      <user-name>Mike Boone</user-name>
      <creator-name>Ryan McGeary</creator-name>
      <assigned-user-name>Ryan McGeary</assigned-user-name>
      <url>http://thoughtbot.lighthouseapp.com/projects/5807/tickets/80</url>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">12160</assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body>Mike,  Good catch.  Fixed.  Thanks.

http://github.com/thoughtbot/shoulda/commit/feed1087bd185fcef97624ab2328f94f59415a2a</body>
      <body-html>&lt;div&gt;&lt;p&gt;Mike, Good catch. Fixed. Thanks.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://github.com/thoughtbot/shoulda/commit/feed1087bd185fcef97624ab2328f94f59415a2a&quot;&gt;
http://github.com/thoughtbot/sho...&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">true</closed>
      <created-at type="datetime">2008-09-16T21:58:31-04:00</created-at>
      <creator-id type="integer">12160</creator-id>
      <diffable-attributes type="yaml">--- {}

</diffable-attributes>
      <milestone-id type="integer" nil="true"></milestone-id>
      <number type="integer">80</number>
      <permalink>conditionally-choose-i18n-or-ar-for-error-messages</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">5807</project-id>
      <state>committed</state>
      <tag>active_record_helper</tag>
      <title>Conditionally choose I18n or AR for error messages</title>
      <updated-at type="datetime">2008-09-16T21:58:34-04:00</updated-at>
      <user-id type="integer">12160</user-id>
      <user-name>Ryan McGeary</user-name>
      <creator-name>Ryan McGeary</creator-name>
      <assigned-user-name>Ryan McGeary</assigned-user-name>
      <url>http://thoughtbot.lighthouseapp.com/projects/5807/tickets/80</url>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">12160</assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body>There seems to be a problem with the key that's being used in this patch.

The actual key I have in my edge rails is &quot;activerecord.errors.messages&quot;. I suppose it changed at some point.

Attached a patch to fix the key and the documentation references to it.</body>
      <body-html>&lt;div&gt;&lt;p&gt;There seems to be a problem with the key that's being used in
this patch.&lt;/p&gt;
&lt;p&gt;The actual key I have in my edge rails is
&quot;activerecord.errors.messages&quot;. I suppose it changed at some
point.&lt;/p&gt;
&lt;p&gt;Attached a patch to fix the key and the documentation references
to it.&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">true</closed>
      <created-at type="datetime">2008-09-18T11:28:42-04:00</created-at>
      <creator-id type="integer">12160</creator-id>
      <diffable-attributes type="yaml">--- {}

</diffable-attributes>
      <milestone-id type="integer" nil="true"></milestone-id>
      <number type="integer">80</number>
      <permalink>conditionally-choose-i18n-or-ar-for-error-messages</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">5807</project-id>
      <state>committed</state>
      <tag>active_record_helper</tag>
      <title>Conditionally choose I18n or AR for error messages</title>
      <updated-at type="datetime">2008-09-18T11:28:43-04:00</updated-at>
      <user-id type="integer">3565</user-id>
      <user-name>Cristi Balan</user-name>
      <creator-name>Ryan McGeary</creator-name>
      <assigned-user-name>Ryan McGeary</assigned-user-name>
      <url>http://thoughtbot.lighthouseapp.com/projects/5807/tickets/80</url>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">12160</assigned-user-id>
      <attachments-count type="integer">1</attachments-count>
      <body>Cristi, Thanks.  I'll push this later today.</body>
      <body-html>&lt;div&gt;&lt;p&gt;Cristi, Thanks. I'll push this later today.&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">false</closed>
      <created-at type="datetime">2008-09-18T12:10:20-04:00</created-at>
      <creator-id type="integer">12160</creator-id>
      <diffable-attributes type="yaml">--- 
:state: committed
</diffable-attributes>
      <milestone-id type="integer" nil="true"></milestone-id>
      <number type="integer">80</number>
      <permalink>conditionally-choose-i18n-or-ar-for-error-messages</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">5807</project-id>
      <state>good-to-go</state>
      <tag>active_record_helper</tag>
      <title>Conditionally choose I18n or AR for error messages</title>
      <updated-at type="datetime">2008-09-18T12:10:22-04:00</updated-at>
      <user-id type="integer">12160</user-id>
      <user-name>Ryan McGeary</user-name>
      <creator-name>Ryan McGeary</creator-name>
      <assigned-user-name>Ryan McGeary</assigned-user-name>
      <url>http://thoughtbot.lighthouseapp.com/projects/5807/tickets/80</url>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">12160</assigned-user-id>
      <attachments-count type="integer">1</attachments-count>
      <body>Edge rails naming problems fixed.  You're right Cristi.  Rails did rename that key.  Thanks!

http://github.com/thoughtbot/shoulda/commit/8a111a6e815fc2a94567d709667a13850b98b5ab

Considering it's edge rails, shoulda should only support the current key name.</body>
      <body-html>&lt;div&gt;&lt;p&gt;Edge rails naming problems fixed. You're right Cristi. Rails did
rename that key. Thanks!&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://github.com/thoughtbot/shoulda/commit/8a111a6e815fc2a94567d709667a13850b98b5ab&quot;&gt;
http://github.com/thoughtbot/sho...&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Considering it's edge rails, shoulda should only support the
current key name.&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">true</closed>
      <created-at type="datetime">2008-09-19T21:53:33-04:00</created-at>
      <creator-id type="integer">12160</creator-id>
      <diffable-attributes type="yaml">--- 
:state: good-to-go
</diffable-attributes>
      <milestone-id type="integer" nil="true"></milestone-id>
      <number type="integer">80</number>
      <permalink>conditionally-choose-i18n-or-ar-for-error-messages</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">5807</project-id>
      <state>committed</state>
      <tag>active_record_helper</tag>
      <title>Conditionally choose I18n or AR for error messages</title>
      <updated-at type="datetime">2008-09-19T21:53:37-04:00</updated-at>
      <user-id type="integer">12160</user-id>
      <user-name>Ryan McGeary</user-name>
      <creator-name>Ryan McGeary</creator-name>
      <assigned-user-name>Ryan McGeary</assigned-user-name>
      <url>http://thoughtbot.lighthouseapp.com/projects/5807/tickets/80</url>
    </version>
  </versions>
  <attachments type="array">
    <attachment type="Attachment">
      <code>9476a81e8e3579fac671cdd7c1adcc3e7d85062b</code>
      <content-type>text/plain</content-type>
      <created-at type="datetime">2008-09-18T11:28:42-04:00</created-at>
      <filename>0001-fix-I18n.translate-key-for-edge-rails.patch</filename>
      <height type="integer" nil="true"></height>
      <id type="integer">46910</id>
      <size type="integer">6025</size>
      <uploader-id type="integer">3565</uploader-id>
      <width type="integer" nil="true"></width>
      <url>http://thoughtbot.lighthouseapp.com/attachments/46910/0001-fix-I18n.translate-key-for-edge-rails.patch</url>
    </attachment>
  </attachments>
</ticket>
