<?xml version="1.0" encoding="UTF-8"?>
<tickets type="array">
  <ticket>
    <assigned-user-id type="integer" nil="true"></assigned-user-id>
    <attachments-count type="integer">2</attachments-count>
    <closed type="boolean">true</closed>
    <created-at type="datetime">2009-12-11T21:20:16+00:00</created-at>
    <creator-id type="integer">19965</creator-id>
    <milestone-due-on type="datetime">2010-01-15T00:00:00+00:00</milestone-due-on>
    <milestone-id type="integer">50064</milestone-id>
    <number type="integer">3564</number>
    <permalink>activerercorderror-broke-errorsaddattribute-type-default-message</permalink>
    <priority type="integer">3</priority>
    <project-id type="integer">8994</project-id>
    <raw-data type="binary" nil="true" encoding="base64"></raw-data>
    <state>resolved</state>
    <tag nil="true"></tag>
    <title>ActiveRercord::Error broke errors.add(attribute, type, :default =&gt; message)</title>
    <updated-at type="datetime">2009-12-16T20:19:42+00:00</updated-at>
    <user-id type="integer">424</user-id>
    <user-name>Joshua Peek</user-name>
    <creator-name>Jos&#233; Valim</creator-name>
    <url>http://rails.lighthouseapp.com/projects/8994/tickets/3564</url>
    <milestone-title>2.3.6</milestone-title>
    <original-body>Previously, this worked:

errors.add(:email, :not_found, :default =&gt; &quot;not found&quot;)

Today, it does not work because it completely ignores the :not_found type and does the I18n lookup using &quot;not found&quot; instead. A patch with a fix and test case is attached.</original-body>
    <latest-body>Previously, this worked:

errors.add(:email, :not_found, :default =&gt; &quot;not found&quot;)

Today, it does not work because it completely ignores the :not_found type and does the I18n lookup using &quot;not found&quot; instead. A patch with a fix and test case is attached.</latest-body>
    <original-body-html>&lt;div&gt;&lt;p&gt;Previously, this worked:&lt;/p&gt;
&lt;p&gt;errors.add(:email, :not_found, :default =&amp;gt; &quot;not found&quot;)&lt;/p&gt;
&lt;p&gt;Today, it does not work because it completely ignores the
:not_found type and does the I18n lookup using &quot;not found&quot; instead.
A patch with a fix and test case is attached.&lt;/p&gt;&lt;/div&gt;</original-body-html>
  </ticket>
  <ticket>
    <assigned-user-id type="integer" nil="true"></assigned-user-id>
    <attachments-count type="integer">0</attachments-count>
    <closed type="boolean">true</closed>
    <created-at type="datetime">2009-10-30T02:06:01+00:00</created-at>
    <creator-id type="integer">19965</creator-id>
    <milestone-due-on type="datetime">2010-01-15T00:00:00+00:00</milestone-due-on>
    <milestone-id type="integer">50064</milestone-id>
    <number type="integer">3444</number>
    <permalink>i18n-should-accept-to-be-given-and-not-whiny-about-it</permalink>
    <priority type="integer">2</priority>
    <project-id type="integer">8994</project-id>
    <raw-data type="binary" nil="true" encoding="base64"></raw-data>
    <state>wontfix</state>
    <tag nil="true"></tag>
    <title>I18n should accept ~ to be given and not whiny about it</title>
    <updated-at type="datetime">2009-12-16T19:13:20+00:00</updated-at>
    <user-id type="integer">19965</user-id>
    <user-name>Jos&#233; Valim</user-name>
    <creator-name>Jos&#233; Valim</creator-name>
    <url>http://rails.lighthouseapp.com/projects/8994/tickets/3444</url>
    <milestone-title>2.3.6</milestone-title>
    <original-body>@@@ ruby
en:
  flash:
    failed: ~
@@@

The code above does not work, since I18n still returns me a &quot;translation missing&quot; message. That would be useful since we can overwrite in the application messages set in plugins.</original-body>
    <latest-body>@@@ ruby
en:
  flash:
    failed: ~
@@@

The code above does not work, since I18n still returns me a &quot;translation missing&quot; message. That would be useful since we can overwrite in the application messages set in plugins.</latest-body>
    <original-body-html>&lt;div&gt;&lt;pre&gt;
&lt;code class=&quot;ruby&quot;&gt;en:
  flash:
    failed: ~&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;The code above does not work, since I18n still returns me a
&quot;translation missing&quot; message. That would be useful since we can
overwrite in the application messages set in plugins.&lt;/p&gt;&lt;/div&gt;</original-body-html>
  </ticket>
  <ticket>
    <assigned-user-id type="integer">6601</assigned-user-id>
    <attachments-count type="integer">0</attachments-count>
    <closed type="boolean">false</closed>
    <created-at type="datetime">2009-10-30T01:54:13+00:00</created-at>
    <creator-id type="integer">19965</creator-id>
    <milestone-due-on type="datetime">2010-01-15T00:00:00+00:00</milestone-due-on>
    <milestone-id type="integer">50064</milestone-id>
    <number type="integer">3443</number>
    <permalink>locales-in-gemsplugins-should-not-have-higher-priority-than-application-locale-files</permalink>
    <priority type="integer">1</priority>
    <project-id type="integer">8994</project-id>
    <raw-data type="binary" nil="true" encoding="base64"></raw-data>
    <state>new</state>
    <tag>gems i18n locale</tag>
    <title>Locales in gems/plugins should not have higher priority than application locale files</title>
    <updated-at type="datetime">2009-12-15T20:17:00+00:00</updated-at>
    <user-id type="integer">19965</user-id>
    <user-name>Jos&#233; Valim</user-name>
    <creator-name>Jos&#233; Valim</creator-name>
    <assigned-user-name>Carl Lerche</assigned-user-name>
    <url>http://rails.lighthouseapp.com/projects/8994/tickets/3443</url>
    <milestone-title>2.3.6</milestone-title>
    <original-body>Since gems/plugins locales files are later in the load path, we cannot overwrite plugins/gems configurations.</original-body>
    <latest-body>Since gems/plugins locales files are later in the load path, we cannot overwrite plugins/gems configurations.</latest-body>
    <original-body-html>&lt;div&gt;&lt;p&gt;Since gems/plugins locales files are later in the load path, we
cannot overwrite plugins/gems configurations.&lt;/p&gt;&lt;/div&gt;</original-body-html>
  </ticket>
  <ticket>
    <assigned-user-id type="integer">85</assigned-user-id>
    <attachments-count type="integer">2</attachments-count>
    <closed type="boolean">true</closed>
    <created-at type="datetime">2009-09-01T12:22:13+01:00</created-at>
    <creator-id type="integer">19965</creator-id>
    <milestone-due-on type="datetime" nil="true"></milestone-due-on>
    <milestone-id type="integer" nil="true"></milestone-id>
    <number type="integer">3128</number>
    <permalink>check-for-primary-key-in-habtm-when-the-association-is-defined</permalink>
    <priority type="integer">132281</priority>
    <project-id type="integer">8994</project-id>
    <raw-data type="binary" nil="true" encoding="base64"></raw-data>
    <state>resolved</state>
    <tag>2.3.4 3.0 habtm</tag>
    <title>Check for primary key in habtm when the association is defined</title>
    <updated-at type="datetime">2009-11-23T18:42:55+00:00</updated-at>
    <user-id type="integer">17393</user-id>
    <user-name>Repository</user-name>
    <creator-name>Jos&#233; Valim</creator-name>
    <assigned-user-name>Jeremy Kemper</assigned-user-name>
    <url>http://rails.lighthouseapp.com/projects/8994/tickets/3128</url>
    <original-body>In this commit:

http://github.com/rails/rails/commit/9d51f6286680b832b0df5e3ce288575214c1de59

We started to check if the primary key in habtm was defined and raise an error if it does. However, the current implementation checks for it every time we insert a record for the first time, per association and then per request.

The patch attached changes it, so it's checked only when the association is defined. I was planning to move the logic to Reflection.check_validity!, but this method is invoked every time an association proxy is created. I tried to make check_validity! to be invoked just on load as well, but :through validity can only be ensured in runtime (when all records are supposed to be loaded).

Patch is for master and 2-3-stable.</original-body>
    <latest-body>In this commit:

http://github.com/rails/rails/commit/9d51f6286680b832b0df5e3ce288575214c1de59

We started to check if the primary key in habtm was defined and raise an error if it does. However, the current implementation checks for it every time we insert a record for the first time, per association and then per request.

The patch attached changes it, so it's checked only when the association is defined. I was planning to move the logic to Reflection.check_validity!, but this method is invoked every time an association proxy is created. I tried to make check_validity! to be invoked just on load as well, but :through validity can only be ensured in runtime (when all records are supposed to be loaded).

Patch is for master and 2-3-stable.</latest-body>
    <original-body-html>&lt;div&gt;&lt;p&gt;In this commit:&lt;/p&gt;
&lt;p&gt;&lt;a href=
&quot;http://github.com/rails/rails/commit/9d51f6286680b832b0df5e3ce288575214c1de59&quot;&gt;
http://github.com/rails/rails/commit/9d51f6286680b832b0df5e3ce28857...&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;We started to check if the primary key in habtm was defined and
raise an error if it does. However, the current implementation
checks for it every time we insert a record for the first time, per
association and then per request.&lt;/p&gt;
&lt;p&gt;The patch attached changes it, so it's checked only when the
association is defined. I was planning to move the logic to
Reflection.check_validity!, but this method is invoked every time
an association proxy is created. I tried to make check_validity! to
be invoked just on load as well, but :through validity can only be
ensured in runtime (when all records are supposed to be
loaded).&lt;/p&gt;
&lt;p&gt;Patch is for master and 2-3-stable.&lt;/p&gt;&lt;/div&gt;</original-body-html>
  </ticket>
  <ticket>
    <assigned-user-id type="integer">424</assigned-user-id>
    <attachments-count type="integer">1</attachments-count>
    <closed type="boolean">true</closed>
    <created-at type="datetime">2009-11-10T13:08:31+00:00</created-at>
    <creator-id type="integer">19965</creator-id>
    <milestone-due-on type="datetime">2010-01-15T00:00:00+00:00</milestone-due-on>
    <milestone-id type="integer">50064</milestone-id>
    <number type="integer">3477</number>
    <permalink>activerecorderror-does-not-allow-values-to-add-errors</permalink>
    <priority type="integer">3</priority>
    <project-id type="integer">8994</project-id>
    <raw-data type="binary" nil="true" encoding="base64"></raw-data>
    <state>resolved</state>
    <tag>2.3.5 activerecord errors</tag>
    <title>ActiveRecord::Error does not allow values to add errors</title>
    <updated-at type="datetime">2009-11-10T18:27:36+00:00</updated-at>
    <user-id type="integer">424</user-id>
    <user-name>Joshua Peek</user-name>
    <creator-name>Jos&#233; Valim</creator-name>
    <assigned-user-name>Joshua Peek</assigned-user-name>
    <url>http://rails.lighthouseapp.com/projects/8994/tickets/3477</url>
    <milestone-title>2.3.6</milestone-title>
    <original-body>(Message from #3147 by Chris Hapgood)

Briefly: an error on an attribute cannot be set as the result of an exception computing the value of the attribute.

For example:

 def v
   compute_it
 rescue
   errors.add(:v, &amp;quot;Dadgummit&amp;quot;)
 end

When compute_it raise an exception, ActiveRecord::Error#initialize references v, which in turn raises another exception, which adds another error, which in turn proves that my stack is not infinitely deep.

Is it reasonable to assume that ActiveRecord::Error instances can reference its erroneous attribute's value?  If so, the above pattern won't work and instead a sentinel value will need to be set (U-G-L-Y).</original-body>
    <latest-body>(Message from #3147 by Chris Hapgood)

Briefly: an error on an attribute cannot be set as the result of an exception computing the value of the attribute.

For example:

 def v
   compute_it
 rescue
   errors.add(:v, &amp;quot;Dadgummit&amp;quot;)
 end

When compute_it raise an exception, ActiveRecord::Error#initialize references v, which in turn raises another exception, which adds another error, which in turn proves that my stack is not infinitely deep.

Is it reasonable to assume that ActiveRecord::Error instances can reference its erroneous attribute's value?  If so, the above pattern won't work and instead a sentinel value will need to be set (U-G-L-Y).</latest-body>
    <original-body-html>&lt;div&gt;&lt;p&gt;(Message from &lt;a href=&quot;/projects/8994/tickets/3147&quot; title=
&quot;Ticket #3147&quot;&gt;#3147&lt;/a&gt; by Chris Hapgood)&lt;/p&gt;
&lt;p&gt;Briefly: an error on an attribute cannot be set as the result of
an exception computing the value of the attribute.&lt;/p&gt;
&lt;p&gt;For example:&lt;/p&gt;
&lt;p&gt;def v compute_it rescue errors.add(:v, &quot;Dadgummit&quot;) end&lt;/p&gt;
&lt;p&gt;When compute_it raise an exception,
ActiveRecord::Error#initialize references v, which in turn raises
another exception, which adds another error, which in turn proves
that my stack is not infinitely deep.&lt;/p&gt;
&lt;p&gt;Is it reasonable to assume that ActiveRecord::Error instances
can reference its erroneous attribute's value? If so, the above
pattern won't work and instead a sentinel value will need to be set
(U-G-L-Y).&lt;/p&gt;&lt;/div&gt;</original-body-html>
  </ticket>
  <ticket>
    <assigned-user-id type="integer">8406</assigned-user-id>
    <attachments-count type="integer">3</attachments-count>
    <closed type="boolean">true</closed>
    <created-at type="datetime">2009-07-17T08:08:58+01:00</created-at>
    <creator-id type="integer">19965</creator-id>
    <milestone-due-on type="datetime">2009-08-31T00:00:00+01:00</milestone-due-on>
    <milestone-id type="integer">41987</milestone-id>
    <number type="integer">2904</number>
    <permalink>avoid-copying-errors-from-child-to-parent-on-autosave</permalink>
    <priority type="integer">2</priority>
    <project-id type="integer">8994</project-id>
    <raw-data type="binary" nil="true" encoding="base64"></raw-data>
    <state>invalid</state>
    <tag nil="true"></tag>
    <title>Avoid copying errors from child to parent on autosave</title>
    <updated-at type="datetime">2009-09-22T13:52:51+01:00</updated-at>
    <user-id type="integer">19965</user-id>
    <user-name>Jos&#233; Valim</user-name>
    <creator-name>Jos&#233; Valim</creator-name>
    <assigned-user-name>Eloy Duran</assigned-user-name>
    <url>http://rails.lighthouseapp.com/projects/8994/tickets/2904</url>
    <milestone-title>2.3.4</milestone-title>
    <original-body>This patch solves the problem discussed on the mailing list where errors were being copied from child to parent on autosave, which is difficult to deal in I18n because it lacks fallback and does string concatenation:

http://groups.google.com/group/rubyonrails-core/browse_thread/thread/90f9eccf9ca35f60

The displaying of error messages on associations was then moved to error_messages_for, since it's basically a view concern. In order to achieve this, two options were added in error_messages_for: :associations and :except.

The first allows me to show nested association messages. Consider that a project has many tasks with the setup as below:

@@@ ruby
  project = Project.new
  task1 = project.tasks.build
  task2 = project.tasks.build

  project.save   #=&gt; false
  project.errors #=&gt; { :title =&gt; &quot;can't be blank&quot;, :tasks =&gt; &quot;is invalid&quot; }
  task1.errors   #=&gt; { :name =&gt; &quot;can't be blank&quot; }
  task2.errors   #=&gt; { :name =&gt; &quot;can't be blank&quot; }

  # error_messages_for below prints something like:
  #
  #  + Title can't be blank
  #  + Tasks
  #    + Name can't be blank
  #
  error_messages_for :project, :associations =&gt; :tasks
@@@

Please notice two things from the code above:

1) Even if the two tasks have the message &quot;Name can't be blank&quot;, the message is shown just once.

2) The &quot;Tasks is invalid&quot; message from project is not showed, since we are already showing the association errors.

The item (2) is handled internally using the option :except. If you give an attribute (or an array of attributes) to :except, the error messages for those attributes are not shown.</original-body>
    <latest-body>This patch solves the problem discussed on the mailing list where errors were being copied from child to parent on autosave, which is difficult to deal in I18n because it lacks fallback and does string concatenation:

http://groups.google.com/group/rubyonrails-core/browse_thread/thread/90f9eccf9ca35f60

The displaying of error messages on associations was then moved to error_messages_for, since it's basically a view concern. In order to achieve this, two options were added in error_messages_for: :associations and :except.

The first allows me to show nested association messages. Consider that a project has many tasks with the setup as below:

@@@ ruby
  project = Project.new
  task1 = project.tasks.build
  task2 = project.tasks.build

  project.save   #=&gt; false
  project.errors #=&gt; { :title =&gt; &quot;can't be blank&quot;, :tasks =&gt; &quot;is invalid&quot; }
  task1.errors   #=&gt; { :name =&gt; &quot;can't be blank&quot; }
  task2.errors   #=&gt; { :name =&gt; &quot;can't be blank&quot; }

  # error_messages_for below prints something like:
  #
  #  + Title can't be blank
  #  + Tasks
  #    + Name can't be blank
  #
  error_messages_for :project, :associations =&gt; :tasks
@@@

Please notice two things from the code above:

1) Even if the two tasks have the message &quot;Name can't be blank&quot;, the message is shown just once.

2) The &quot;Tasks is invalid&quot; message from project is not showed, since we are already showing the association errors.

The item (2) is handled internally using the option :except. If you give an attribute (or an array of attributes) to :except, the error messages for those attributes are not shown.</latest-body>
    <original-body-html>&lt;div&gt;&lt;p&gt;This patch solves the problem discussed on the mailing list
where errors were being copied from child to parent on autosave,
which is difficult to deal in I18n because it lacks fallback and
does string concatenation:&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://groups.google.com/group/rubyonrails-core/browse_thread/thread/90f9eccf9ca35f60&quot;&gt;
http://groups.google.com/group/r...&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The displaying of error messages on associations was then moved
to error_messages_for, since it's basically a view concern. In
order to achieve this, two options were added in
error_messages_for: :associations and :except.&lt;/p&gt;
&lt;p&gt;The first allows me to show nested association messages.
Consider that a project has many tasks with the setup as below:&lt;/p&gt;


&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;
  project = Project.new
  task1 = project.tasks.build
  task2 = project.tasks.build

  project.save   #=&amp;gt; false
  project.errors #=&amp;gt; { :title =&amp;gt; &amp;quot;can't be blank&amp;quot;, :tasks =&amp;gt; &amp;quot;is invalid&amp;quot; }
  task1.errors   #=&amp;gt; { :name =&amp;gt; &amp;quot;can't be blank&amp;quot; }
  task2.errors   #=&amp;gt; { :name =&amp;gt; &amp;quot;can't be blank&amp;quot; }

  # error_messages_for below prints something like:
  #
  #  + Title can't be blank
  #  + Tasks
  #    + Name can't be blank
  #
  error_messages_for :project, :associations =&amp;gt; :tasks
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Please notice two things from the code above:&lt;/p&gt;
&lt;p&gt;1) Even if the two tasks have the message &quot;Name can't be blank&quot;,
the message is shown just once.&lt;/p&gt;
&lt;p&gt;2) The &quot;Tasks is invalid&quot; message from project is not showed,
since we are already showing the association errors.&lt;/p&gt;
&lt;p&gt;The item (2) is handled internally using the option :except. If
you give an attribute (or an array of attributes) to :except, the
error messages for those attributes are not shown.&lt;/p&gt;&lt;/div&gt;</original-body-html>
  </ticket>
  <ticket>
    <assigned-user-id type="integer">8406</assigned-user-id>
    <attachments-count type="integer">1</attachments-count>
    <closed type="boolean">true</closed>
    <created-at type="datetime">2009-07-09T09:59:44+01:00</created-at>
    <creator-id type="integer">19965</creator-id>
    <milestone-due-on type="datetime">2010-01-15T00:00:00+00:00</milestone-due-on>
    <milestone-id type="integer">50064</milestone-id>
    <number type="integer">2889</number>
    <permalink>rename-_delete-to-_destroy-in-nested-attributes</permalink>
    <priority type="integer">9</priority>
    <project-id type="integer">8994</project-id>
    <raw-data type="binary" nil="true" encoding="base64"></raw-data>
    <state>resolved</state>
    <tag nil="true"></tag>
    <title>Rename _delete to _destroy in nested attributes</title>
    <updated-at type="datetime">2009-09-13T02:33:46+01:00</updated-at>
    <user-id type="integer">17393</user-id>
    <user-name>Repository</user-name>
    <creator-name>Jos&#233; Valim</creator-name>
    <assigned-user-name>Eloy Duran</assigned-user-name>
    <url>http://rails.lighthouseapp.com/projects/8994/tickets/2889</url>
    <milestone-title>2.3.6</milestone-title>
    <original-body>When nested attributes was released in 2.3 it came with a small inconsistency. The DSL uses :allow_destroy, the method called in the associated object is :destroy but the trigger is called *_delete*. This patch changes _delete to _destroy but adds a deprecation warning. Documentation was also updated.

As already discussed in the mailing list, someone already wanted to add a _delete behavior that will actually delete the associated record. So renaming _delete to _destroy now makes room for improvements in the future.</original-body>
    <latest-body>When nested attributes was released in 2.3 it came with a small inconsistency. The DSL uses :allow_destroy, the method called in the associated object is :destroy but the trigger is called *_delete*. This patch changes _delete to _destroy but adds a deprecation warning. Documentation was also updated.

As already discussed in the mailing list, someone already wanted to add a _delete behavior that will actually delete the associated record. So renaming _delete to _destroy now makes room for improvements in the future.</latest-body>
    <original-body-html>&lt;div&gt;&lt;p&gt;When nested attributes was released in 2.3 it came with a small
inconsistency. The DSL uses :allow_destroy, the method called in
the associated object is :destroy but the trigger is called
&lt;em&gt;_delete&lt;/em&gt;. This patch changes &lt;em&gt;delete to&lt;/em&gt; destroy but
adds a deprecation warning. Documentation was also updated.&lt;/p&gt;
&lt;p&gt;As already discussed in the mailing list, someone already wanted
to add a &lt;em&gt;delete behavior that will actually delete the
associated record. So renaming&lt;/em&gt; delete to _destroy now makes
room for improvements in the future.&lt;/p&gt;&lt;/div&gt;</original-body-html>
  </ticket>
  <ticket>
    <assigned-user-id type="integer">85</assigned-user-id>
    <attachments-count type="integer">2</attachments-count>
    <closed type="boolean">true</closed>
    <created-at type="datetime">2009-09-02T19:58:21+01:00</created-at>
    <creator-id type="integer">19965</creator-id>
    <milestone-due-on type="datetime" nil="true"></milestone-due-on>
    <milestone-id type="integer">27004</milestone-id>
    <number type="integer">3136</number>
    <permalink>change-activerecord-callbacks-to-use-faster-implementation-and-speed-up-observers</permalink>
    <priority type="integer">9</priority>
    <project-id type="integer">8994</project-id>
    <raw-data type="binary" nil="true" encoding="base64"></raw-data>
    <state>resolved</state>
    <tag>activerecord callbacks observer</tag>
    <title>Change ActiveRecord callbacks to use faster implementation and speed up Observers</title>
    <updated-at type="datetime">2009-09-11T21:03:23+01:00</updated-at>
    <user-id type="integer">19965</user-id>
    <user-name>Jos&#233; Valim</user-name>
    <creator-name>Jos&#233; Valim</creator-name>
    <assigned-user-name>Jeremy Kemper</assigned-user-name>
    <url>http://rails.lighthouseapp.com/projects/8994/tickets/3136</url>
    <milestone-title>3.0</milestone-title>
    <original-body></original-body>
    <latest-body></latest-body>
    <original-body-html></original-body-html>
  </ticket>
  <ticket>
    <assigned-user-id type="integer">7400</assigned-user-id>
    <attachments-count type="integer">0</attachments-count>
    <closed type="boolean">false</closed>
    <created-at type="datetime">2009-09-08T16:47:57+01:00</created-at>
    <creator-id type="integer">19965</creator-id>
    <milestone-due-on type="datetime" nil="true"></milestone-due-on>
    <milestone-id type="integer" nil="true"></milestone-id>
    <number type="integer">3167</number>
    <permalink>flexible-formatting-for-ar-validations-should-be-on-master</permalink>
    <priority type="integer">32886</priority>
    <project-id type="integer">8994</project-id>
    <raw-data type="binary" nil="true" encoding="base64"></raw-data>
    <state>new</state>
    <tag>3.0 activerecord validations</tag>
    <title>Flexible formatting for AR validations should be on master</title>
    <updated-at type="datetime">2009-09-08T16:48:01+01:00</updated-at>
    <user-id type="integer">19965</user-id>
    <user-name>Jos&#233; Valim</user-name>
    <creator-name>Jos&#233; Valim</creator-name>
    <assigned-user-name>Sven Fuchs</assigned-user-name>
    <url>http://rails.lighthouseapp.com/projects/8994/tickets/3167</url>
    <original-body>https://rails.lighthouseapp.com/projects/8994/tickets/1687-flexible-formatting-for-ar-validation-error-messages</original-body>
    <latest-body>https://rails.lighthouseapp.com/projects/8994/tickets/1687-flexible-formatting-for-ar-validation-error-messages</latest-body>
    <original-body-html>&lt;div&gt;&lt;p&gt;&lt;a href=
&quot;https://rails.lighthouseapp.com/projects/8994/tickets/1687-flexible-formatting-for-ar-validation-error-messages&quot;&gt;
https://rails.lighthouseapp.com/projects/8994/tickets/1687-flexible...&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;</original-body-html>
  </ticket>
  <ticket>
    <assigned-user-id type="integer">1</assigned-user-id>
    <attachments-count type="integer">1</attachments-count>
    <closed type="boolean">true</closed>
    <created-at type="datetime">2008-05-16T18:21:08+01:00</created-at>
    <creator-id type="integer">19965</creator-id>
    <milestone-due-on type="datetime">2009-03-18T00:00:00+00:00</milestone-due-on>
    <milestone-id type="integer">9901</milestone-id>
    <number type="integer">209</number>
    <permalink>added-environment-options-to-config-gem</permalink>
    <priority type="integer">11164</priority>
    <project-id type="integer">8994</project-id>
    <raw-data type="binary" nil="true" encoding="base64"></raw-data>
    <state>invalid</state>
    <tag>2.2.2 bug</tag>
    <title>Added :environment options to config.gem</title>
    <updated-at type="datetime">2009-08-14T03:38:39+01:00</updated-at>
    <user-id type="integer">21993</user-id>
    <user-name>Donald Ball</user-name>
    <creator-name>Jos&#233; Valim</creator-name>
    <assigned-user-name>Rick</assigned-user-name>
    <url>http://rails.lighthouseapp.com/projects/8994/tickets/209</url>
    <milestone-title>2.1.1</milestone-title>
    <original-body>This way we can specify which gems will be loaded in each environment. This is useful since we don't want ZenTest or ruby-debug running in production.

Usage:

config.gem &quot;ZenTest&quot;, :environment =&gt; :test
config.gem &quot;ruby-debug&quot;, :environment =&gt; [:development, :test]

Tests included.</original-body>
    <latest-body>This way we can specify which gems will be loaded in each environment. This is useful since we don't want ZenTest or ruby-debug running in production.

Usage:

config.gem &quot;ZenTest&quot;, :environment =&gt; :test
config.gem &quot;ruby-debug&quot;, :environment =&gt; [:development, :test]

Tests included.</latest-body>
    <original-body-html>&lt;div&gt;&lt;p&gt;
This way we can specify which gems will be loaded in each environment. This is useful since we don't want ZenTest or ruby-debug running in production.
&lt;/p&gt;&lt;p&gt;
Usage:
&lt;/p&gt;&lt;p&gt;
config.gem &quot;ZenTest&quot;, :environment =&gt; :test
&lt;/p&gt;&lt;p&gt;
config.gem &quot;ruby-debug&quot;, :environment =&gt; [:development, :test]
&lt;/p&gt;&lt;p&gt;
Tests included.
&lt;/p&gt;&lt;/div&gt;</original-body-html>
  </ticket>
  <ticket>
    <assigned-user-id type="integer" nil="true"></assigned-user-id>
    <attachments-count type="integer">1</attachments-count>
    <closed type="boolean">true</closed>
    <created-at type="datetime">2009-08-09T18:26:00+01:00</created-at>
    <creator-id type="integer">19965</creator-id>
    <milestone-due-on type="datetime">2009-08-31T00:00:00+01:00</milestone-due-on>
    <milestone-id type="integer">41987</milestone-id>
    <number type="integer">3025</number>
    <permalink>modelhuman_attribute_name-does-not-accept-symbols</permalink>
    <priority type="integer">20</priority>
    <project-id type="integer">8994</project-id>
    <raw-data type="binary" nil="true" encoding="base64"></raw-data>
    <state>resolved</state>
    <tag>activerecord verified</tag>
    <title>Model#human_attribute_name does not accept symbols</title>
    <updated-at type="datetime">2009-08-09T23:57:31+01:00</updated-at>
    <user-id type="integer">19965</user-id>
    <user-name>Jos&#233; Valim</user-name>
    <creator-name>Jos&#233; Valim</creator-name>
    <url>http://rails.lighthouseapp.com/projects/8994/tickets/3025</url>
    <milestone-title>2.3.4</milestone-title>
    <original-body>Post.human_attribute_name(:body) does not work, I always have to add convert :body to string. Would be nice if the API accept symbols too.</original-body>
    <latest-body>Post.human_attribute_name(:body) does not work, I always have to add convert :body to string. Would be nice if the API accept symbols too.</latest-body>
    <original-body-html>&lt;div&gt;&lt;p&gt;Post.human_attribute_name(:body) does not work, I always have to
add convert :body to string. Would be nice if the API accept
symbols too.&lt;/p&gt;&lt;/div&gt;</original-body-html>
  </ticket>
  <ticket>
    <assigned-user-id type="integer" nil="true"></assigned-user-id>
    <attachments-count type="integer">1</attachments-count>
    <closed type="boolean">true</closed>
    <created-at type="datetime">2009-08-08T11:56:12+01:00</created-at>
    <creator-id type="integer">19965</creator-id>
    <milestone-due-on type="datetime">2009-08-31T00:00:00+01:00</milestone-due-on>
    <milestone-id type="integer">41987</milestone-id>
    <number type="integer">3006</number>
    <permalink>patch-to-fix-broken-http-digest-authentication</permalink>
    <priority type="integer">19</priority>
    <project-id type="integer">8994</project-id>
    <raw-data type="binary" nil="true" encoding="base64"></raw-data>
    <state>resolved</state>
    <tag>2.x 3.0 actioncontroller</tag>
    <title> Patch to fix broken HTTP Digest Authentication</title>
    <updated-at type="datetime">2009-08-09T16:13:01+01:00</updated-at>
    <user-id type="integer">17393</user-id>
    <user-name>Repository</user-name>
    <creator-name>Jos&#233; Valim</creator-name>
    <url>http://rails.lighthouseapp.com/projects/8994/tickets/3006</url>
    <milestone-title>2.3.4</milestone-title>
    <original-body>Current HTTP Digest Authentication does not work with some browser/servers combinations.

For example, Webrick uses the full REQUEST_URI, while a browser like Safari or Firefox only send the relative_uri. In this case, HTTP Digest won't work.

On the other hand, IE sends the full REQUEST_URI, so it may not work with servers like mongrel or thin.

This patch attempts to let it flexible enough to work with a different combination of servers/browsers, without changing any security rule.

I tested in &quot;real life&quot; with Firefox on Linux on both webrick and thin. Would be nice if some tests would be executed with Safari and IE with both servers.

For some guidance, you could follow Ryan Daigle tutorial to setup: http://ryandaigle.com/articles/2009/1/30/what-s-new-in-edge-rails-http-digest-authentication</original-body>
    <latest-body>Current HTTP Digest Authentication does not work with some browser/servers combinations.

For example, Webrick uses the full REQUEST_URI, while a browser like Safari or Firefox only send the relative_uri. In this case, HTTP Digest won't work.

On the other hand, IE sends the full REQUEST_URI, so it may not work with servers like mongrel or thin.

This patch attempts to let it flexible enough to work with a different combination of servers/browsers, without changing any security rule.

I tested in &quot;real life&quot; with Firefox on Linux on both webrick and thin. Would be nice if some tests would be executed with Safari and IE with both servers.

For some guidance, you could follow Ryan Daigle tutorial to setup: http://ryandaigle.com/articles/2009/1/30/what-s-new-in-edge-rails-http-digest-authentication</latest-body>
    <original-body-html>&lt;div&gt;&lt;p&gt;Current HTTP Digest Authentication does not work with some
browser/servers combinations.&lt;/p&gt;
&lt;p&gt;For example, Webrick uses the full REQUEST_URI, while a browser
like Safari or Firefox only send the relative_uri. In this case,
HTTP Digest won't work.&lt;/p&gt;
&lt;p&gt;On the other hand, IE sends the full REQUEST_URI, so it may not
work with servers like mongrel or thin.&lt;/p&gt;
&lt;p&gt;This patch attempts to let it flexible enough to work with a
different combination of servers/browsers, without changing any
security rule.&lt;/p&gt;
&lt;p&gt;I tested in &quot;real life&quot; with Firefox on Linux on both webrick
and thin. Would be nice if some tests would be executed with Safari
and IE with both servers.&lt;/p&gt;
&lt;p&gt;For some guidance, you could follow Ryan Daigle tutorial to
setup: &lt;a href=&quot;http://ryandaigle.com/articles/2009/1/30/what-s-new-in-edge-rails-http-digest-authentication&quot;&gt;
http://ryandaigle.com/articles/2...&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;</original-body-html>
  </ticket>
  <ticket>
    <assigned-user-id type="integer">19965</assigned-user-id>
    <attachments-count type="integer">1</attachments-count>
    <closed type="boolean">true</closed>
    <created-at type="datetime">2009-08-08T17:47:05+01:00</created-at>
    <creator-id type="integer">19965</creator-id>
    <milestone-due-on type="datetime" nil="true"></milestone-due-on>
    <milestone-id type="integer">27004</milestone-id>
    <number type="integer">3008</number>
    <permalink>rails-generators-does-not-take-into-consideration-activerecordsessionstoresessiontable_name</permalink>
    <priority type="integer">2</priority>
    <project-id type="integer">8994</project-id>
    <raw-data type="binary" nil="true" encoding="base64"></raw-data>
    <state>resolved</state>
    <tag nil="true"></tag>
    <title>Rails generators does not take into consideration ActiveRecord::SessionStore::Session.table_name</title>
    <updated-at type="datetime">2009-08-09T05:18:43+01:00</updated-at>
    <user-id type="integer">17393</user-id>
    <user-name>Repository</user-name>
    <creator-name>Jos&#233; Valim</creator-name>
    <assigned-user-name>Jos&#233; Valim</assigned-user-name>
    <url>http://rails.lighthouseapp.com/projects/8994/tickets/3008</url>
    <milestone-title>3.0</milestone-title>
    <original-body>The patch applied on #2745 should also be ported and applied on current edge.</original-body>
    <latest-body>The patch applied on #2745 should also be ported and applied on current edge.</latest-body>
    <original-body-html>&lt;div&gt;&lt;p&gt;The patch applied on &lt;a href=&quot;/projects/8994/tickets/2745&quot; title=&quot;Ticket #2745&quot;&gt;#2745&lt;/a&gt; should also be ported and applied on
current edge.&lt;/p&gt;&lt;/div&gt;</original-body-html>
  </ticket>
  <ticket>
    <assigned-user-id type="integer">1366</assigned-user-id>
    <attachments-count type="integer">1</attachments-count>
    <closed type="boolean">true</closed>
    <created-at type="datetime">2009-06-12T20:35:21+01:00</created-at>
    <creator-id type="integer">19965</creator-id>
    <milestone-due-on type="datetime" nil="true"></milestone-due-on>
    <milestone-id type="integer">9903</milestone-id>
    <number type="integer">2795</number>
    <permalink>has_one-with-a-belongs_to-as-source-association</permalink>
    <priority type="integer">1812</priority>
    <project-id type="integer">8994</project-id>
    <raw-data type="binary" nil="true" encoding="base64"></raw-data>
    <state>wontfix</state>
    <tag nil="true"></tag>
    <title>has_one with a belongs_to as source association</title>
    <updated-at type="datetime">2009-08-08T12:11:06+01:00</updated-at>
    <user-id type="integer">19965</user-id>
    <user-name>Jos&#233; Valim</user-name>
    <creator-name>Jos&#233; Valim</creator-name>
    <assigned-user-name>Pratik</assigned-user-name>
    <url>http://rails.lighthouseapp.com/projects/8994/tickets/2795</url>
    <milestone-title>2.x</milestone-title>
    <original-body>This patches allow you to use a has_one association with a belongs_to as source. Assuming that House belongs to City that belongs to Country:

@@@ ruby
  class House
    belongs_to :city
    has_one :country, :through =&gt; :city
  end

  class City
    belongs_to :country
  end

  class Country
  end
@@@

The following works in Rails current versions (preload case):

@@@ ruby
  House.all(:include =&gt; :country)
@@@

The following DOES NOT work on Rails current version and is fixed by this patch (non-preload case):

@@@ ruby
  House.all(:include =&gt; :country, :conditions =&gt; [&quot;countries.name = ?&quot;, &quot;Brazil&quot;])
@@@

However, as I talked with Pratik and Koz on IRC, we could simply do this:

@@@ ruby
  House.all(:include =&gt; { :city =&gt; :country }, :conditions =&gt; [&quot;countries.name = ?&quot;, &quot;Brazil&quot;])
@@@

I've created the patch because I've needed this behavior in geokit-rails, which was later fixed to work with the { :city =&gt; :country } case, but currently it has no use and it should not be applied until someone comes up with a use case for it.

This ticket is just to document the patch.</original-body>
    <latest-body>This patches allow you to use a has_one association with a belongs_to as source. Assuming that House belongs to City that belongs to Country:

@@@ ruby
  class House
    belongs_to :city
    has_one :country, :through =&gt; :city
  end

  class City
    belongs_to :country
  end

  class Country
  end
@@@

The following works in Rails current versions (preload case):

@@@ ruby
  House.all(:include =&gt; :country)
@@@

The following DOES NOT work on Rails current version and is fixed by this patch (non-preload case):

@@@ ruby
  House.all(:include =&gt; :country, :conditions =&gt; [&quot;countries.name = ?&quot;, &quot;Brazil&quot;])
@@@

However, as I talked with Pratik and Koz on IRC, we could simply do this:

@@@ ruby
  House.all(:include =&gt; { :city =&gt; :country }, :conditions =&gt; [&quot;countries.name = ?&quot;, &quot;Brazil&quot;])
@@@

I've created the patch because I've needed this behavior in geokit-rails, which was later fixed to work with the { :city =&gt; :country } case, but currently it has no use and it should not be applied until someone comes up with a use case for it.

This ticket is just to document the patch.</latest-body>
    <original-body-html>&lt;div&gt;&lt;p&gt;This patches allow you to use a has_one association with a
belongs_to as source. Assuming that House belongs to City that
belongs to Country:&lt;/p&gt;


&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;
  class House
    belongs_to :city
    has_one :country, :through =&amp;gt; :city
  end

  class City
    belongs_to :country
  end

  class Country
  end
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The following works in Rails current versions (preload
case):&lt;/p&gt;


&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;
  House.all(:include =&amp;gt; :country)
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The following DOES NOT work on Rails current version and is
fixed by this patch (non-preload case):&lt;/p&gt;


&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;
  House.all(:include =&amp;gt; :country, :conditions =&amp;gt; [&amp;quot;countries.name = ?&amp;quot;, &amp;quot;Brazil&amp;quot;])
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;However, as I talked with Pratik and Koz on IRC, we could simply
do this:&lt;/p&gt;


&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;
  House.all(:include =&amp;gt; { :city =&amp;gt; :country }, :conditions =&amp;gt; [&amp;quot;countries.name = ?&amp;quot;, &amp;quot;Brazil&amp;quot;])
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;I've created the patch because I've needed this behavior in
geokit-rails, which was later fixed to work with the { :city =&amp;gt;
:country } case, but currently it has no use and it should not be
applied until someone comes up with a use case for it.&lt;/p&gt;
&lt;p&gt;This ticket is just to document the patch.&lt;/p&gt;&lt;/div&gt;</original-body-html>
  </ticket>
  <ticket>
    <assigned-user-id type="integer">8406</assigned-user-id>
    <attachments-count type="integer">1</attachments-count>
    <closed type="boolean">true</closed>
    <created-at type="datetime">2009-04-01T11:55:25+01:00</created-at>
    <creator-id type="integer">19965</creator-id>
    <milestone-due-on type="datetime" nil="true"></milestone-due-on>
    <milestone-id type="integer">9903</milestone-id>
    <number type="integer">2391</number>
    <permalink>allow-strings-to-be-sent-as-collection-to-select</permalink>
    <priority type="integer">1550</priority>
    <project-id type="integer">8994</project-id>
    <raw-data type="binary" nil="true" encoding="base64"></raw-data>
    <state>committed</state>
    <tag>actionview form_for select tiny</tag>
    <title>Allow strings to be sent as collection to select</title>
    <updated-at type="datetime">2009-05-15T04:31:15+01:00</updated-at>
    <user-id type="integer">17393</user-id>
    <user-name>Repository</user-name>
    <creator-name>Jos&#233; Valim</creator-name>
    <assigned-user-name>Eloy Duran</assigned-user-name>
    <url>http://rails.lighthouseapp.com/projects/8994/tickets/2391</url>
    <milestone-title>2.x</milestone-title>
    <original-body>Why?

The main reason is to allow the following:

@@@ ruby
fields_for @post do |f|
  f.select(:category_id, grouped_options_for_select(...))
end
@@@

Since grouped_options_for_select returns a string, prior to this patch this wouldn't work. We would have to use select_tag method, which is not very friendly since it does not generate names properly (post[category]) and does not work with nested attributes as well (it wouldn't generate blog[post][0][category]).</original-body>
    <latest-body>Why?

The main reason is to allow the following:

@@@ ruby
fields_for @post do |f|
  f.select(:category_id, grouped_options_for_select(...))
end
@@@

Since grouped_options_for_select returns a string, prior to this patch this wouldn't work. We would have to use select_tag method, which is not very friendly since it does not generate names properly (post[category]) and does not work with nested attributes as well (it wouldn't generate blog[post][0][category]).</latest-body>
    <original-body-html>&lt;div&gt;&lt;p&gt;Why?&lt;/p&gt;
&lt;p&gt;The main reason is to allow the following:&lt;/p&gt;


&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;
fields_for @post do |f|
  f.select(:category_id, grouped_options_for_select(...))
end
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Since grouped_options_for_select returns a string, prior to this
patch this wouldn't work. We would have to use select_tag method,
which is not very friendly since it does not generate names
properly (post[category]) and does not work with nested attributes
as well (it wouldn't generate blog[post][0][category]).&lt;/p&gt;&lt;/div&gt;</original-body-html>
  </ticket>
  <ticket>
    <assigned-user-id type="integer" nil="true"></assigned-user-id>
    <attachments-count type="integer">2</attachments-count>
    <closed type="boolean">true</closed>
    <created-at type="datetime">2009-03-17T00:58:10+00:00</created-at>
    <creator-id type="integer">19965</creator-id>
    <milestone-due-on type="datetime" nil="true"></milestone-due-on>
    <milestone-id type="integer">9903</milestone-id>
    <number type="integer">2262</number>
    <permalink>associations-are-picking-the-wrong-class</permalink>
    <priority type="integer">1440</priority>
    <project-id type="integer">8994</project-id>
    <raw-data type="binary" nil="true" encoding="base64"></raw-data>
    <state>invalid</state>
    <tag>activerecord associations patch small tests</tag>
    <title>Associations are picking the wrong class</title>
    <updated-at type="datetime">2009-05-08T00:11:46+01:00</updated-at>
    <user-id type="integer">17477</user-id>
    <user-name>Frederick Cheung</user-name>
    <creator-name>Jos&#233; Valim</creator-name>
    <url>http://rails.lighthouseapp.com/projects/8994/tickets/2262</url>
    <milestone-title>2.x</milestone-title>
    <original-body>This is being discussed on the mailing list:

http://groups.google.com/group/rubyonrails-core/browse_thread/thread/37e25977536c65a2

### Problem ###

@@@ ruby
  class User &lt; ActiveRecord::Base
  end

  class Admin::User &lt; ActiveRecord::Base
  end

  class Account &lt; ActiveRecord::Base
    belongs_to :user
  end
@@@

When I was calling Account.new.build_user, it was trying to create a
new Admin::User because the default class_name is just &quot;User&quot;.

### Where? ###

Rails 2.3.2

### Why this is a problem? ###

Let's suppose I'm building an application (without using namespaced models at all) and then I install a plugin that has Plugin::User. My associations will start to pick Plugin::User, and this is really hard to track down.

### Solution? ###

I propose a solution where all associations :class_name is, by default, namespaced. So:

@@@ ruby
  # have default class_name of ::User
  class Account &lt; ActiveRecord::Base; belongs_to :user; end

  # have default class_name of ::Admin::User
  class Admin::Account &lt; ActiveRecord::Base; belongs_to :user; end
@@@

### Compatibility? ###

It will break apps that are relying in this wrong behavior. The good point is that the error will be raised when the application starts (can't find association error). The way it's now, takes quite sometime for you to discover that Account was trying to build a Admin::User instead of User.</original-body>
    <latest-body>This is being discussed on the mailing list:

http://groups.google.com/group/rubyonrails-core/browse_thread/thread/37e25977536c65a2

### Problem ###

@@@ ruby
  class User &lt; ActiveRecord::Base
  end

  class Admin::User &lt; ActiveRecord::Base
  end

  class Account &lt; ActiveRecord::Base
    belongs_to :user
  end
@@@

When I was calling Account.new.build_user, it was trying to create a
new Admin::User because the default class_name is just &quot;User&quot;.

### Where? ###

Rails 2.3.2

### Why this is a problem? ###

Let's suppose I'm building an application (without using namespaced models at all) and then I install a plugin that has Plugin::User. My associations will start to pick Plugin::User, and this is really hard to track down.

### Solution? ###

I propose a solution where all associations :class_name is, by default, namespaced. So:

@@@ ruby
  # have default class_name of ::User
  class Account &lt; ActiveRecord::Base; belongs_to :user; end

  # have default class_name of ::Admin::User
  class Admin::Account &lt; ActiveRecord::Base; belongs_to :user; end
@@@

### Compatibility? ###

It will break apps that are relying in this wrong behavior. The good point is that the error will be raised when the application starts (can't find association error). The way it's now, takes quite sometime for you to discover that Account was trying to build a Admin::User instead of User.</latest-body>
    <original-body-html>&lt;div&gt;&lt;p&gt;This is being discussed on the mailing list:&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://groups.google.com/group/rubyonrails-core/browse_thread/thread/37e25977536c65a2&quot;&gt;
http://groups.google.com/group/r...&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;Problem&lt;/h3&gt;


&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;
  class User &amp;lt; ActiveRecord::Base
  end

  class Admin::User &amp;lt; ActiveRecord::Base
  end

  class Account &amp;lt; ActiveRecord::Base
    belongs_to :user
  end
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;When I was calling Account.new.build_user, it was trying to
create a new Admin::User because the default class_name is just
&quot;User&quot;.&lt;/p&gt;
&lt;h3&gt;Where?&lt;/h3&gt;
&lt;p&gt;Rails 2.3.2&lt;/p&gt;
&lt;h3&gt;Why this is a problem?&lt;/h3&gt;
&lt;p&gt;Let's suppose I'm building an application (without using
namespaced models at all) and then I install a plugin that has
Plugin::User. My associations will start to pick Plugin::User, and
this is really hard to track down.&lt;/p&gt;
&lt;h3&gt;Solution?&lt;/h3&gt;
&lt;p&gt;I propose a solution where all associations :class_name is, by
default, namespaced. So:&lt;/p&gt;


&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;
  # have default class_name of ::User
  class Account &amp;lt; ActiveRecord::Base; belongs_to :user; end

  # have default class_name of ::Admin::User
  class Admin::Account &amp;lt; ActiveRecord::Base; belongs_to :user; end
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;Compatibility?&lt;/h3&gt;
&lt;p&gt;It will break apps that are relying in this wrong behavior. The
good point is that the error will be raised when the application
starts (can't find association error). The way it's now, takes
quite sometime for you to discover that Account was trying to build
a Admin::User instead of User.&lt;/p&gt;&lt;/div&gt;</original-body-html>
  </ticket>
  <ticket>
    <assigned-user-id type="integer" nil="true"></assigned-user-id>
    <attachments-count type="integer">1</attachments-count>
    <closed type="boolean">true</closed>
    <created-at type="datetime">2009-01-11T10:14:58+00:00</created-at>
    <creator-id type="integer">19965</creator-id>
    <milestone-due-on type="datetime">2009-01-31T00:00:00+00:00</milestone-due-on>
    <milestone-id type="integer" nil="true"></milestone-id>
    <number type="integer">1731</number>
    <permalink>make-enable_starttls_auto-opt-in-in-actionmailer</permalink>
    <priority type="integer">0</priority>
    <project-id type="integer">8994</project-id>
    <raw-data type="binary" nil="true" encoding="base64"></raw-data>
    <state>resolved</state>
    <tag>2.2 actionmailer &quot;getaddrinfo: name or service not known&quot; smtp socketerror</tag>
    <title>Make enable_starttls_auto opt-in in ActionMailer</title>
    <updated-at type="datetime">2009-05-06T01:10:32+01:00</updated-at>
    <user-id type="integer">56167</user-id>
    <user-name>Mark Glossop</user-name>
    <creator-name>Jos&#233; Valim</creator-name>
    <url>http://rails.lighthouseapp.com/projects/8994/tickets/1731</url>
    <original-body>This commit:

http://github.com/rails/rails/commit/732c724df61bc8b780dc42817625b25a321908e4

Enabled automatically STARTTLS in SMPT server making some applications break.

This patch makes enable_starttls_auto opt-in.</original-body>
    <latest-body>This commit:

http://github.com/rails/rails/commit/732c724df61bc8b780dc42817625b25a321908e4

Enabled automatically STARTTLS in SMPT server making some applications break.

This patch makes enable_starttls_auto opt-in.</latest-body>
    <original-body-html>&lt;div&gt;&lt;p&gt;This commit:&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://github.com/rails/rails/commit/732c724df61bc8b780dc42817625b25a321908e4&quot;&gt;
http://github.com/rails/rails/co...&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Enabled automatically STARTTLS in SMPT server making some
applications break.&lt;/p&gt;
&lt;p&gt;This patch makes enable_starttls_auto opt-in.&lt;/p&gt;&lt;/div&gt;</original-body-html>
  </ticket>
  <ticket>
    <assigned-user-id type="integer">1366</assigned-user-id>
    <attachments-count type="integer">1</attachments-count>
    <closed type="boolean">true</closed>
    <created-at type="datetime">2009-04-18T13:51:32+01:00</created-at>
    <creator-id type="integer">19965</creator-id>
    <milestone-due-on type="datetime" nil="true"></milestone-due-on>
    <milestone-id type="integer">9903</milestone-id>
    <number type="integer">2517</number>
    <permalink>time_zone_select-documentation-is-outdated</permalink>
    <priority type="integer">1513</priority>
    <project-id type="integer">8994</project-id>
    <raw-data type="binary" nil="true" encoding="base64"></raw-data>
    <state>wontfix</state>
    <tag>2.3.2 action_view doc documentation timezone tiny</tag>
    <title>time_zone_select documentation is outdated</title>
    <updated-at type="datetime">2009-04-18T20:10:10+01:00</updated-at>
    <user-id type="integer">1366</user-id>
    <user-name>Pratik</user-name>
    <creator-name>Jos&#233; Valim</creator-name>
    <assigned-user-name>Pratik</assigned-user-name>
    <url>http://rails.lighthouseapp.com/projects/8994/tickets/2517</url>
    <milestone-title>2.x</milestone-title>
    <original-body>Currently, the documentation and examples uses the TimeZone object, while it should refer to the ActiveSupport::TimeZone object.

Patch attached.</original-body>
    <latest-body>Currently, the documentation and examples uses the TimeZone object, while it should refer to the ActiveSupport::TimeZone object.

Patch attached.</latest-body>
    <original-body-html>&lt;div&gt;&lt;p&gt;Currently, the documentation and examples uses the TimeZone
object, while it should refer to the ActiveSupport::TimeZone
object.&lt;/p&gt;
&lt;p&gt;Patch attached.&lt;/p&gt;&lt;/div&gt;</original-body-html>
  </ticket>
  <ticket>
    <assigned-user-id type="integer" nil="true"></assigned-user-id>
    <attachments-count type="integer">1</attachments-count>
    <closed type="boolean">true</closed>
    <created-at type="datetime">2009-04-01T10:30:14+01:00</created-at>
    <creator-id type="integer">19965</creator-id>
    <milestone-due-on type="datetime" nil="true"></milestone-due-on>
    <milestone-id type="integer">9903</milestone-id>
    <number type="integer">2390</number>
    <permalink>object-names-with-underscore-do-the-wrong-lookup-in-i18n-on-error_messages_for</permalink>
    <priority type="integer">1549</priority>
    <project-id type="integer">8994</project-id>
    <raw-data type="binary" nil="true" encoding="base64"></raw-data>
    <state>committed</state>
    <tag>actionview bug error_messages_for i18n verified</tag>
    <title>Object names with underscore do the wrong lookup in I18n on error_messages_for</title>
    <updated-at type="datetime">2009-04-05T10:45:55+01:00</updated-at>
    <user-id type="integer">17393</user-id>
    <user-name>Repository</user-name>
    <creator-name>Jos&#233; Valim</creator-name>
    <url>http://rails.lighthouseapp.com/projects/8994/tickets/2390</url>
    <milestone-title>2.x</milestone-title>
    <original-body>If I have an object name like &quot;book_seller.&quot; On error_messages_for it will search for &quot;book seller&quot; instead of &quot;book_seller&quot;.

A quick solution is two maintain both on I18n files:

 activerecord:
    models:
      book_seller &quot;Book seller&quot;
      book seller: &quot;Book seller&quot;

This patch fix that.</original-body>
    <latest-body>If I have an object name like &quot;book_seller.&quot; On error_messages_for it will search for &quot;book seller&quot; instead of &quot;book_seller&quot;.

A quick solution is two maintain both on I18n files:

 activerecord:
    models:
      book_seller &quot;Book seller&quot;
      book seller: &quot;Book seller&quot;

This patch fix that.</latest-body>
    <original-body-html>&lt;div&gt;&lt;p&gt;If I have an object name like &quot;book_seller.&quot; On
error_messages_for it will search for &quot;book seller&quot; instead of
&quot;book_seller&quot;.&lt;/p&gt;
&lt;p&gt;A quick solution is two maintain both on I18n files:&lt;/p&gt;
&lt;p&gt;activerecord:&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;models:
  book_seller &quot;Book seller&quot;
  book seller: &quot;Book seller&quot;
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;This patch fix that.&lt;/p&gt;&lt;/div&gt;</original-body-html>
  </ticket>
  <ticket>
    <assigned-user-id type="integer">424</assigned-user-id>
    <attachments-count type="integer">1</attachments-count>
    <closed type="boolean">true</closed>
    <created-at type="datetime">2009-02-05T18:00:31+00:00</created-at>
    <creator-id type="integer">19965</creator-id>
    <milestone-due-on type="datetime">2009-01-31T00:00:00+00:00</milestone-due-on>
    <milestone-id type="integer" nil="true"></milestone-id>
    <number type="integer">1886</number>
    <permalink>html-fallback-when-format-is-js-should-be-also-localized</permalink>
    <priority type="integer">47</priority>
    <project-id type="integer">8994</project-id>
    <raw-data type="binary" nil="true" encoding="base64"></raw-data>
    <state>resolved</state>
    <tag>actionpack localization</tag>
    <title>HTML fallback when format is :js should be also localized</title>
    <updated-at type="datetime">2009-02-07T18:08:15+00:00</updated-at>
    <user-id type="integer">17393</user-id>
    <user-name>Repository</user-name>
    <creator-name>Jos&#233; Valim</creator-name>
    <assigned-user-name>Joshua Peek</assigned-user-name>
    <url>http://rails.lighthouseapp.com/projects/8994/tickets/1886</url>
    <original-body>The current implementation of localized templates on rails/actionpack/lib/action_view/paths.rb is incomplete.

At the line 48, when we check for a html file when format is js (this is used in when xhr? is true) should be also localized. So what we have now as:

  # Try to find html version if the format is javascript
  elsif format == :js &amp;&amp; template = load_path[&quot;#{template_path}.html&quot;]
    return template
  end

Should actually be:

  # Try to find html version if the format is javascript
  elsif format == :js &amp;&amp; template = load_path[&quot;#{template_path}.#{I18n.locale}.html&quot;]
    return template
  end
  elsif format == :js &amp;&amp; template = load_path[&quot;#{template_path}.html&quot;]
    return template
  end

I'm not building a patch, since it's a quick fix.</original-body>
    <latest-body>The current implementation of localized templates on rails/actionpack/lib/action_view/paths.rb is incomplete.

At the line 48, when we check for a html file when format is js (this is used in when xhr? is true) should be also localized. So what we have now as:

  # Try to find html version if the format is javascript
  elsif format == :js &amp;&amp; template = load_path[&quot;#{template_path}.html&quot;]
    return template
  end

Should actually be:

  # Try to find html version if the format is javascript
  elsif format == :js &amp;&amp; template = load_path[&quot;#{template_path}.#{I18n.locale}.html&quot;]
    return template
  end
  elsif format == :js &amp;&amp; template = load_path[&quot;#{template_path}.html&quot;]
    return template
  end

I'm not building a patch, since it's a quick fix.</latest-body>
    <original-body-html>&lt;div&gt;&lt;p&gt;The current implementation of localized templates on
rails/actionpack/lib/action_view/paths.rb is incomplete.&lt;/p&gt;
&lt;p&gt;At the line 48, when we check for a html file when format is js
(this is used in when xhr? is true) should be also localized. So
what we have now as:&lt;/p&gt;
&lt;p&gt;# Try to find html version if the format is javascript elsif
format == :js &amp;amp;&amp;amp; template =
load_path[&quot;#{template_path}.html&quot;]&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;return template
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;end&lt;/p&gt;
&lt;p&gt;Should actually be:&lt;/p&gt;
&lt;p&gt;# Try to find html version if the format is javascript elsif
format == :js &amp;amp;&amp;amp; template =
load_path[&quot;#{template_path}.#{I18n.locale}.html&quot;]&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;return template
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;end elsif format == :js &amp;amp;&amp;amp; template =
load_path[&quot;#{template_path}.html&quot;]&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;return template
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;end&lt;/p&gt;
&lt;p&gt;I'm not building a patch, since it's a quick fix.&lt;/p&gt;&lt;/div&gt;</original-body-html>
  </ticket>
  <ticket>
    <assigned-user-id type="integer">424</assigned-user-id>
    <attachments-count type="integer">2</attachments-count>
    <closed type="boolean">true</closed>
    <created-at type="datetime">2009-02-05T18:36:41+00:00</created-at>
    <creator-id type="integer">19965</creator-id>
    <milestone-due-on type="datetime">2009-01-31T00:00:00+00:00</milestone-due-on>
    <milestone-id type="integer" nil="true"></milestone-id>
    <number type="integer">1888</number>
    <permalink>localized-templates-does-not-work-with-pt-br-or-en-us-as-locale</permalink>
    <priority type="integer">55</priority>
    <project-id type="integer">8994</project-id>
    <raw-data type="binary" nil="true" encoding="base64"></raw-data>
    <state>resolved</state>
    <tag nil="true"></tag>
    <title>Localized templates does not work with &quot;pt-BR&quot; or &quot;en-US&quot; as locale</title>
    <updated-at type="datetime">2009-02-07T05:29:25+00:00</updated-at>
    <user-id type="integer">17393</user-id>
    <user-name>Repository</user-name>
    <creator-name>Jos&#233; Valim</creator-name>
    <assigned-user-name>Joshua Peek</assigned-user-name>
    <url>http://rails.lighthouseapp.com/projects/8994/tickets/1888</url>
    <original-body>Localized templates is not working when the locale contains a dash &quot;-&quot;.

The reason of it is on rails/actionpack/lib/action_view/template.rb.

On line 239 we see the regexp that process our extensions in our view path is

@@@ ruby
    m = extensions.match(/^(\w+)?\.?(\w+)?\.?(\w+)?\.?/) 
@@@

The first parenthesis, which is the one that checks for the locale does not accepts dash -.

A working regexp would be:

@@@ ruby
  /^(\w+\-?\w*)?\.?(\w+)?\.?(\w+)?\.?/
@@@

And we can see it working on Rubular:

http://www.rubular.com/regexes/6077</original-body>
    <latest-body>Localized templates is not working when the locale contains a dash &quot;-&quot;.

The reason of it is on rails/actionpack/lib/action_view/template.rb.

On line 239 we see the regexp that process our extensions in our view path is

@@@ ruby
    m = extensions.match(/^(\w+)?\.?(\w+)?\.?(\w+)?\.?/) 
@@@

The first parenthesis, which is the one that checks for the locale does not accepts dash -.

A working regexp would be:

@@@ ruby
  /^(\w+\-?\w*)?\.?(\w+)?\.?(\w+)?\.?/
@@@

And we can see it working on Rubular:

http://www.rubular.com/regexes/6077</latest-body>
    <original-body-html>&lt;div&gt;&lt;p&gt;Localized templates is not working when the locale contains a
dash &quot;-&quot;.&lt;/p&gt;
&lt;p&gt;The reason of it is on
rails/actionpack/lib/action_view/template.rb.&lt;/p&gt;
&lt;p&gt;On line 239 we see the regexp that process our extensions in our
view path is&lt;/p&gt;


&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;
    m = extensions.match(/^(\w+)?\.?(\w+)?\.?(\w+)?\.?/) 
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The first parenthesis, which is the one that checks for the
locale does not accepts dash -.&lt;/p&gt;
&lt;p&gt;A working regexp would be:&lt;/p&gt;


&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;
  /^(\w+\-?\w*)?\.?(\w+)?\.?(\w+)?\.?/
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;And we can see it working on Rubular:&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://www.rubular.com/regexes/6077&quot;&gt;http://www.rubular.com/regexes/6077&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;</original-body-html>
  </ticket>
  <ticket>
    <assigned-user-id type="integer">424</assigned-user-id>
    <attachments-count type="integer">0</attachments-count>
    <closed type="boolean">true</closed>
    <created-at type="datetime">2009-02-05T16:50:40+00:00</created-at>
    <creator-id type="integer">19965</creator-id>
    <milestone-due-on type="datetime" nil="true"></milestone-due-on>
    <milestone-id type="integer">9903</milestone-id>
    <number type="integer">1884</number>
    <permalink>actionviewbase-_render_stack-is-not-being-filled-on-edge</permalink>
    <priority type="integer">1115</priority>
    <project-id type="integer">8994</project-id>
    <raw-data type="binary" nil="true" encoding="base64"></raw-data>
    <state>wontfix</state>
    <tag nil="true"></tag>
    <title>ActionView::Base @_render_stack is not being filled on edge</title>
    <updated-at type="datetime">2009-02-05T22:30:19+00:00</updated-at>
    <user-id type="integer">19965</user-id>
    <user-name>Jos&#233; Valim</user-name>
    <creator-name>Jos&#233; Valim</creator-name>
    <assigned-user-name>Joshua Peek</assigned-user-name>
    <url>http://rails.lighthouseapp.com/projects/8994/tickets/1884</url>
    <milestone-title>2.x</milestone-title>
    <original-body>I'm the developer of Rails Footnotes plugin and I need to know the location of the template being rendered.

I've put a debugger at the end of process method on ActionController::Base, and then called:

  @template.template

Which returned nil, Since the template method give me the last object in the @_render_stack variable, I've checked and I can't actually see where the @_render_stack is being filled. It's always empty.</original-body>
    <latest-body>I'm the developer of Rails Footnotes plugin and I need to know the location of the template being rendered.

I've put a debugger at the end of process method on ActionController::Base, and then called:

  @template.template

Which returned nil, Since the template method give me the last object in the @_render_stack variable, I've checked and I can't actually see where the @_render_stack is being filled. It's always empty.</latest-body>
    <original-body-html>&lt;div&gt;&lt;p&gt;I'm the developer of Rails Footnotes plugin and I need to know
the location of the template being rendered.&lt;/p&gt;
&lt;p&gt;I've put a debugger at the end of process method on
ActionController::Base, and then called:&lt;/p&gt;
&lt;p&gt;@template.template&lt;/p&gt;
&lt;p&gt;Which returned nil, Since the template method give me the last
object in the @&lt;em&gt;render_stack variable, I've checked and I can't
actually see where the @&lt;/em&gt;render_stack is being filled. It's
always empty.&lt;/p&gt;&lt;/div&gt;</original-body-html>
  </ticket>
  <ticket>
    <assigned-user-id type="integer">83</assigned-user-id>
    <attachments-count type="integer">1</attachments-count>
    <closed type="boolean">true</closed>
    <created-at type="datetime">2009-02-01T08:52:14+00:00</created-at>
    <creator-id type="integer">19965</creator-id>
    <milestone-due-on type="datetime" nil="true"></milestone-due-on>
    <milestone-id type="integer">9903</milestone-id>
    <number type="integer">1835</number>
    <permalink>add-localized-rescue</permalink>
    <priority type="integer">941</priority>
    <project-id type="integer">8994</project-id>
    <raw-data type="binary" nil="true" encoding="base64"></raw-data>
    <state>committed</state>
    <tag>2.3 actionpack localization</tag>
    <title>Add Localized Rescue</title>
    <updated-at type="datetime">2009-02-02T16:58:59+00:00</updated-at>
    <user-id type="integer">17393</user-id>
    <user-name>Repository</user-name>
    <creator-name>Jos&#233; Valim</creator-name>
    <assigned-user-name>DHH</assigned-user-name>
    <url>http://rails.lighthouseapp.com/projects/8994/tickets/1835</url>
    <milestone-title>2.x</milestone-title>
    <original-body>This patch adds Localized Rescue to Rails. This way we can have &quot;public/404.en.html&quot; or &quot;public/404.pt-BR.html&quot;. If the localized rescue file can't be found, render the default one &quot;public/404.html&quot;.

Discussion here: http://groups.google.com/group/rubyonrails-core/browse_thread/thread/32dafcea780bda1e</original-body>
    <latest-body>This patch adds Localized Rescue to Rails. This way we can have &quot;public/404.en.html&quot; or &quot;public/404.pt-BR.html&quot;. If the localized rescue file can't be found, render the default one &quot;public/404.html&quot;.

Discussion here: http://groups.google.com/group/rubyonrails-core/browse_thread/thread/32dafcea780bda1e</latest-body>
    <original-body-html>&lt;div&gt;&lt;p&gt;This patch adds Localized Rescue to Rails. This way we can have
&quot;public/404.en.html&quot; or &quot;public/404.pt-BR.html&quot;. If the localized
rescue file can't be found, render the default one
&quot;public/404.html&quot;.&lt;/p&gt;
&lt;p&gt;Discussion here: &lt;a href=&quot;http://groups.google.com/group/rubyonrails-core/browse_thread/thread/32dafcea780bda1e&quot;&gt;
http://groups.google.com/group/r...&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;</original-body-html>
  </ticket>
  <ticket>
    <assigned-user-id type="integer" nil="true"></assigned-user-id>
    <attachments-count type="integer">0</attachments-count>
    <closed type="boolean">true</closed>
    <created-at type="datetime">2008-07-30T15:46:09+01:00</created-at>
    <creator-id type="integer">19965</creator-id>
    <milestone-due-on type="datetime" nil="true"></milestone-due-on>
    <milestone-id type="integer">9903</milestone-id>
    <number type="integer">728</number>
    <permalink>config-load_paths-should-also-be-frozen</permalink>
    <priority type="integer">193</priority>
    <project-id type="integer">8994</project-id>
    <raw-data type="binary" nil="true" encoding="base64"></raw-data>
    <state>resolved</state>
    <tag>bug railties</tag>
    <title>config.load_paths should also be frozen</title>
    <updated-at type="datetime">2008-10-30T21:28:42+00:00</updated-at>
    <user-id type="integer">17393</user-id>
    <user-name>Repository</user-name>
    <creator-name>Jos&#233; Valim</creator-name>
    <url>http://rails.lighthouseapp.com/projects/8994/tickets/728</url>
    <milestone-title>2.x</milestone-title>
    <original-body>On Rails::Initializer, configuration.load_once_paths is frozen but config.load_paths is not.

We need to freeze them so future modifications will fail rather than do nothing mysteriously. For example, I was changing the variable on my environment/development.rb and the path I was setting was never loaded.

To fix, just add the line:

  configuration.load_paths.freeze

To railties/lib/initializer.rb, method set_autoload_paths, around line 214.

So we will have:

  def set_autoload_paths
    Dependencies.load_paths = configuration.load_paths.uniq
    Dependencies.load_once_paths = configuration.load_once_paths.uniq

    extra = Dependencies.load_once_paths - Dependencies.load_paths
    unless extra.empty?
      abort &lt;&lt;-end_error
        load_once_paths must be a subset of the load_paths.
        Extra items in load_once_paths: #{extra * ','}
      end_error
    end

    configuration.load_once_paths.freeze
  end</original-body>
    <latest-body>On Rails::Initializer, configuration.load_once_paths is frozen but config.load_paths is not.

We need to freeze them so future modifications will fail rather than do nothing mysteriously. For example, I was changing the variable on my environment/development.rb and the path I was setting was never loaded.

To fix, just add the line:

  configuration.load_paths.freeze

To railties/lib/initializer.rb, method set_autoload_paths, around line 214.

So we will have:

  def set_autoload_paths
    Dependencies.load_paths = configuration.load_paths.uniq
    Dependencies.load_once_paths = configuration.load_once_paths.uniq

    extra = Dependencies.load_once_paths - Dependencies.load_paths
    unless extra.empty?
      abort &lt;&lt;-end_error
        load_once_paths must be a subset of the load_paths.
        Extra items in load_once_paths: #{extra * ','}
      end_error
    end

    configuration.load_once_paths.freeze
  end</latest-body>
    <original-body-html>&lt;div&gt;&lt;p&gt;
On Rails::Initializer, configuration.load_once_paths is frozen but config.load_paths is not.
&lt;/p&gt;&lt;p&gt;
We need to freeze them so future modifications will fail rather than do nothing mysteriously. For example, I was changing the variable on my environment/development.rb and the path I was setting was never loaded.
&lt;/p&gt;&lt;p&gt;
To fix, just add the line:
&lt;/p&gt;&lt;p&gt;
configuration.load_paths.freeze
&lt;/p&gt;&lt;p&gt;
To railties/lib/initializer.rb, method set_autoload_paths, around line 214.
&lt;/p&gt;&lt;p&gt;
So we will have:
&lt;/p&gt;&lt;p&gt;
def set_autoload_paths
&lt;/p&gt;&lt;p&gt;
Dependencies.load_paths = configuration.load_paths.uniq
&lt;/p&gt;&lt;p&gt;
Dependencies.load_once_paths = configuration.load_once_paths.uniq
&lt;/p&gt;&lt;p&gt;
extra = Dependencies.load_once_paths - Dependencies.load_paths
&lt;/p&gt;&lt;p&gt;
unless extra.empty?
&lt;/p&gt;&lt;p&gt;
abort &amp;lt;&lt;/p&gt;&lt;p&gt;
load_once_paths must be a subset of the load_paths.
&lt;/p&gt;&lt;p&gt;
Extra items in load_once_paths: #{extra * ','}
&lt;/p&gt;&lt;p&gt;
end_error
&lt;/p&gt;&lt;p&gt;
end
&lt;/p&gt;&lt;p&gt;
configuration.load_once_paths.freeze
&lt;/p&gt;&lt;p&gt;
end
&lt;/p&gt;&lt;/div&gt;</original-body-html>
  </ticket>
  <ticket>
    <assigned-user-id type="integer" nil="true"></assigned-user-id>
    <attachments-count type="integer">1</attachments-count>
    <closed type="boolean">true</closed>
    <created-at type="datetime">2008-06-14T09:53:33+01:00</created-at>
    <creator-id type="integer">19965</creator-id>
    <milestone-due-on type="datetime" nil="true"></milestone-due-on>
    <milestone-id type="integer" nil="true"></milestone-id>
    <number type="integer">416</number>
    <permalink>caches_actions-accepts-cache_store-options-such-as-expires_in</permalink>
    <priority type="integer">16631</priority>
    <project-id type="integer">8994</project-id>
    <raw-data type="binary" nil="true" encoding="base64"></raw-data>
    <state>resolved</state>
    <tag>actionpack patch tested</tag>
    <title>caches_actions accepts cache_store options such as :expires_in</title>
    <updated-at type="datetime">2008-09-13T20:20:54+01:00</updated-at>
    <user-id type="integer">23117</user-id>
    <user-name>Alex Farrill</user-name>
    <creator-name>Jos&#233; Valim</creator-name>
    <url>http://rails.lighthouseapp.com/projects/8994/tickets/416</url>
    <original-body>With this tiny path, we will be able to do:

@@@ ruby
  class ProjectsController &lt; ActionController::Base
    caches_action :show, :expires_in =&gt; 1.hour
  end
@@@

This is useful if you are using memcached.

Tests included (just an expectation to check if options are being sent).</original-body>
    <latest-body>With this tiny path, we will be able to do:

@@@ ruby
  class ProjectsController &lt; ActionController::Base
    caches_action :show, :expires_in =&gt; 1.hour
  end
@@@

This is useful if you are using memcached.

Tests included (just an expectation to check if options are being sent).</latest-body>
    <original-body-html>&lt;div&gt;&lt;p&gt;
With this tiny path, we will be able to do:
&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;  class ProjectsController &amp;lt; ActionController::Base
    caches_action :show, :expires_in =&amp;gt; 1.hour
  end&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;
This is useful if you are using memcached.
&lt;/p&gt;&lt;p&gt;
Tests included (just an expectation to check if options are being sent).
&lt;/p&gt;&lt;/div&gt;</original-body-html>
  </ticket>
  <ticket>
    <assigned-user-id type="integer">85</assigned-user-id>
    <attachments-count type="integer">0</attachments-count>
    <closed type="boolean">true</closed>
    <created-at type="datetime">2008-07-29T20:03:43+01:00</created-at>
    <creator-id type="integer">19965</creator-id>
    <milestone-due-on type="datetime">2009-03-18T00:00:00+00:00</milestone-due-on>
    <milestone-id type="integer">9901</milestone-id>
    <number type="integer">722</number>
    <permalink>rails-initializer-should-assure-erb-is-loaded-before-reading-database-yml</permalink>
    <priority type="integer">11956</priority>
    <project-id type="integer">8994</project-id>
    <raw-data type="binary" nil="true" encoding="base64"></raw-data>
    <state>resolved</state>
    <tag>bug railties</tag>
    <title>Rails::Initializer should assure ERB is loaded before reading database.yml</title>
    <updated-at type="datetime">2008-07-30T10:08:01+01:00</updated-at>
    <user-id type="integer">17393</user-id>
    <user-name>Repository</user-name>
    <creator-name>Jos&#233; Valim</creator-name>
    <assigned-user-name>Jeremy Kemper</assigned-user-name>
    <url>http://rails.lighthouseapp.com/projects/8994/tickets/722</url>
    <milestone-title>2.1.1</milestone-title>
    <original-body>I was trying to create an environment where only ActiveRecord was loaded, but since ERB is loaded by ActionPack, when reading and interpreting database.yml on initializer.rb, it raises an error.

To fix I just needed to add the line below to railties/lib/initializer.rb, on the database_configuration method (around line 700):

  require 'erb' unless defined?(ERB)

So we have:

  def database_configuration
    require 'erb' unless defined?(ERB)
    YAML::load(ERB.new(IO.read(database_configuration_file)).result)
  end</original-body>
    <latest-body>I was trying to create an environment where only ActiveRecord was loaded, but since ERB is loaded by ActionPack, when reading and interpreting database.yml on initializer.rb, it raises an error.

To fix I just needed to add the line below to railties/lib/initializer.rb, on the database_configuration method (around line 700):

  require 'erb' unless defined?(ERB)

So we have:

  def database_configuration
    require 'erb' unless defined?(ERB)
    YAML::load(ERB.new(IO.read(database_configuration_file)).result)
  end</latest-body>
    <original-body-html>&lt;div&gt;&lt;p&gt;
I was trying to create an environment where only ActiveRecord was loaded, but since ERB is loaded by ActionPack, when reading and interpreting database.yml on initializer.rb, it raises an error.
&lt;/p&gt;&lt;p&gt;
To fix I just needed to add the line below to railties/lib/initializer.rb, on the database_configuration method (around line 700):
&lt;/p&gt;&lt;p&gt;
require 'erb' unless defined?(ERB)
&lt;/p&gt;&lt;p&gt;
So we have:
&lt;/p&gt;&lt;p&gt;
def database_configuration
&lt;/p&gt;&lt;p&gt;
require 'erb' unless defined?(ERB)
&lt;/p&gt;&lt;p&gt;
YAML::load(ERB.new(IO.read(database_configuration_file)).result)
&lt;/p&gt;&lt;p&gt;
end
&lt;/p&gt;&lt;/div&gt;</original-body-html>
  </ticket>
  <ticket>
    <assigned-user-id type="integer">85</assigned-user-id>
    <attachments-count type="integer">0</attachments-count>
    <closed type="boolean">true</closed>
    <created-at type="datetime">2008-07-29T19:41:08+01:00</created-at>
    <creator-id type="integer">19965</creator-id>
    <milestone-due-on type="datetime">2009-03-18T00:00:00+00:00</milestone-due-on>
    <milestone-id type="integer">9901</milestone-id>
    <number type="integer">721</number>
    <permalink>dispatcher-should-only-be-loaded-if-actioncontroller-is-defined</permalink>
    <priority type="integer">11955</priority>
    <project-id type="integer">8994</project-id>
    <raw-data type="binary" nil="true" encoding="base64"></raw-data>
    <state>resolved</state>
    <tag>bug railties</tag>
    <title>dispatcher should only be loaded if ActionController is defined</title>
    <updated-at type="datetime">2008-07-30T10:07:58+01:00</updated-at>
    <user-id type="integer">17393</user-id>
    <user-name>Repository</user-name>
    <creator-name>Jos&#233; Valim</creator-name>
    <assigned-user-name>Jeremy Kemper</assigned-user-name>
    <url>http://rails.lighthouseapp.com/projects/8994/tickets/721</url>
    <milestone-title>2.1.1</milestone-title>
    <original-body>I was trying to create an environment where only ActiveRecord and ActionMailer were loaded but it failed on the last step.

The dispatcher is loaded even if ActionController is not defined. To fix it I just needed to add the line below to railties/lib/initializer.rb, on the prepare_dispatcher method, around line 480:

  return unless configuration.frameworks.include?(:action_controller)

So we have:

  def prepare_dispatcher
    return unless configuration.frameworks.include?(:action_controller)
    require 'dispatcher' unless defined?(::Dispatcher)
    Dispatcher.define_dispatcher_callbacks(configuration.cache_classes)
    Dispatcher.new(RAILS_DEFAULT_LOGGER).send :run_callbacks, :prepare_dispatch
  end</original-body>
    <latest-body>I was trying to create an environment where only ActiveRecord and ActionMailer were loaded but it failed on the last step.

The dispatcher is loaded even if ActionController is not defined. To fix it I just needed to add the line below to railties/lib/initializer.rb, on the prepare_dispatcher method, around line 480:

  return unless configuration.frameworks.include?(:action_controller)

So we have:

  def prepare_dispatcher
    return unless configuration.frameworks.include?(:action_controller)
    require 'dispatcher' unless defined?(::Dispatcher)
    Dispatcher.define_dispatcher_callbacks(configuration.cache_classes)
    Dispatcher.new(RAILS_DEFAULT_LOGGER).send :run_callbacks, :prepare_dispatch
  end</latest-body>
    <original-body-html>&lt;div&gt;&lt;p&gt;
I was trying to create an environment where only ActiveRecord and ActionMailer were loaded but it failed on the last step.
&lt;/p&gt;&lt;p&gt;
The dispatcher is loaded even if ActionController is not defined. To fix it I just needed to add the line below to railties/lib/initializer.rb, on the prepare_dispatcher method, around line 480:
&lt;/p&gt;&lt;p&gt;
return unless configuration.frameworks.include?(:action_controller)
&lt;/p&gt;&lt;p&gt;
So we have:
&lt;/p&gt;&lt;p&gt;
def prepare_dispatcher
&lt;/p&gt;&lt;p&gt;
return unless configuration.frameworks.include?(:action_controller)
&lt;/p&gt;&lt;p&gt;
require 'dispatcher' unless defined?(::Dispatcher)
&lt;/p&gt;&lt;p&gt;
Dispatcher.define_dispatcher_callbacks(configuration.cache_classes)
&lt;/p&gt;&lt;p&gt;
Dispatcher.new(RAILS_DEFAULT_LOGGER).send :run_callbacks, :prepare_dispatch
&lt;/p&gt;&lt;p&gt;
end
&lt;/p&gt;&lt;/div&gt;</original-body-html>
  </ticket>
  <ticket>
    <assigned-user-id type="integer">1366</assigned-user-id>
    <attachments-count type="integer">1</attachments-count>
    <closed type="boolean">true</closed>
    <created-at type="datetime">2008-06-12T13:14:50+01:00</created-at>
    <creator-id type="integer">19965</creator-id>
    <milestone-due-on type="datetime" nil="true"></milestone-due-on>
    <milestone-id type="integer" nil="true"></milestone-id>
    <number type="integer">402</number>
    <permalink>request_forgery_protection_token-should-be-set-at-actioncontroller-base-load-time</permalink>
    <priority type="integer">18280</priority>
    <project-id type="integer">8994</project-id>
    <raw-data type="binary" nil="true" encoding="base64"></raw-data>
    <state>wontfix</state>
    <tag>actionpack bug patch request-forgery-protection</tag>
    <title>request_forgery_protection_token should be set at ActionController::Base load time</title>
    <updated-at type="datetime">2008-07-04T02:09:19+01:00</updated-at>
    <user-id type="integer">1366</user-id>
    <user-name>Pratik</user-name>
    <creator-name>Jos&#233; Valim</creator-name>
    <assigned-user-name>Pratik</assigned-user-name>
    <url>http://rails.lighthouseapp.com/projects/8994/tickets/402</url>
    <original-body>This is a small-tiny-patch but important one.

I have one controller, that logs-in users:

@@@ ruby
  class UsersController &lt; ActionController::Base
    protect_from_forgery :only =&gt; :login

    def login
      ...
    end
  end
@@@

And I have another one, that shows my homepage:

@@@ ruby
  class ContentController &lt; ActionController::Base
    def index
      ...
    end
  end
@@@

What happens is that my homepage has a form to login users quickly, but since request_forgery_protection_token is nil when my app loads, protect_against_forgery? returns false and the form doesn't have a authenticity_token field.

So, when the user fill the form, it will be sent to UsersController#login, that will call protect_from_forgery that will finally set request_forgery_protection_token.

But since no token was sent, it will raise a InvalidAutenticityToken error.

To fix this, we just have to set on ActionController::Base:

@@@ ruby
  @@request_forgery_protection_token = :authenticity_token
@@@

And while it's not released, I recommend to put the line above in your ApplicationController.</original-body>
    <latest-body>This is a small-tiny-patch but important one.

I have one controller, that logs-in users:

@@@ ruby
  class UsersController &lt; ActionController::Base
    protect_from_forgery :only =&gt; :login

    def login
      ...
    end
  end
@@@

And I have another one, that shows my homepage:

@@@ ruby
  class ContentController &lt; ActionController::Base
    def index
      ...
    end
  end
@@@

What happens is that my homepage has a form to login users quickly, but since request_forgery_protection_token is nil when my app loads, protect_against_forgery? returns false and the form doesn't have a authenticity_token field.

So, when the user fill the form, it will be sent to UsersController#login, that will call protect_from_forgery that will finally set request_forgery_protection_token.

But since no token was sent, it will raise a InvalidAutenticityToken error.

To fix this, we just have to set on ActionController::Base:

@@@ ruby
  @@request_forgery_protection_token = :authenticity_token
@@@

And while it's not released, I recommend to put the line above in your ApplicationController.</latest-body>
    <original-body-html>&lt;div&gt;&lt;p&gt;
This is a small-tiny-patch but important one.
&lt;/p&gt;&lt;p&gt;
I have one controller, that logs-in users:
&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;  class UsersController &amp;lt; ActionController::Base
    protect_from_forgery :only =&amp;gt; :login

    def login
      ...
    end
  end&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;
And I have another one, that shows my homepage:
&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;  class ContentController &amp;lt; ActionController::Base
    def index
      ...
    end
  end&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;
What happens is that my homepage has a form to login users quickly, but since request_forgery_protection_token is nil when my app loads, protect_against_forgery? returns false and the form doesn't have a authenticity_token field.
&lt;/p&gt;&lt;p&gt;
So, when the user fill the form, it will be sent to UsersController#login, that will call protect_from_forgery that will finally set request_forgery_protection_token.
&lt;/p&gt;&lt;p&gt;
But since no token was sent, it will raise a InvalidAutenticityToken error.
&lt;/p&gt;&lt;p&gt;
To fix this, we just have to set on ActionController::Base:
&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;  @@request_forgery_protection_token = :authenticity_token&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;
And while it's not released, I recommend to put the line above in your ApplicationController.
&lt;/p&gt;&lt;/div&gt;</original-body-html>
  </ticket>
  <ticket>
    <assigned-user-id type="integer">1366</assigned-user-id>
    <attachments-count type="integer">2</attachments-count>
    <closed type="boolean">true</closed>
    <created-at type="datetime">2008-06-02T12:26:07+01:00</created-at>
    <creator-id type="integer">19965</creator-id>
    <milestone-due-on type="datetime" nil="true"></milestone-due-on>
    <milestone-id type="integer" nil="true"></milestone-id>
    <number type="integer">298</number>
    <permalink>added-more-support-to-actionview-base-erb_variable</permalink>
    <priority type="integer">17003</priority>
    <project-id type="integer">8994</project-id>
    <raw-data type="binary" nil="true" encoding="base64"></raw-data>
    <state>invalid</state>
    <tag>actionpack bug patch</tag>
    <title>Added more support to ActionView::Base.erb_variable</title>
    <updated-at type="datetime">2008-06-17T18:54:16+01:00</updated-at>
    <user-id type="integer">1366</user-id>
    <user-name>Pratik</user-name>
    <creator-name>Jos&#233; Valim</creator-name>
    <assigned-user-name>Pratik</assigned-user-name>
    <url>http://rails.lighthouseapp.com/projects/8994/tickets/298</url>
    <original-body>If we change ActionView::Base.erb_variable, cache_fragment doesn't work and some javascript functions also, because they are checking for the existence of '_erbout' instead of the variable set in erb_variable.

It's just a small patch, that fix javascript functions and send erb_variable to Erb.new().

I also added the line below in fragment cache tests setup to assure that they are working with any variable set.

ActionView::Base.erb_variable = '_buf'</original-body>
    <latest-body>If we change ActionView::Base.erb_variable, cache_fragment doesn't work and some javascript functions also, because they are checking for the existence of '_erbout' instead of the variable set in erb_variable.

It's just a small patch, that fix javascript functions and send erb_variable to Erb.new().

I also added the line below in fragment cache tests setup to assure that they are working with any variable set.

ActionView::Base.erb_variable = '_buf'</latest-body>
    <original-body-html>&lt;div&gt;&lt;p&gt;
If we change ActionView::Base.erb_variable, cache_fragment doesn't work and some javascript functions also, because they are checking for the existence of '_erbout' instead of the variable set in erb_variable.
&lt;/p&gt;&lt;p&gt;
It's just a small patch, that fix javascript functions and send erb_variable to Erb.new().
&lt;/p&gt;&lt;p&gt;
I also added the line below in fragment cache tests setup to assure that they are working with any variable set.
&lt;/p&gt;&lt;p&gt;
ActionView::Base.erb_variable = '_buf'
&lt;/p&gt;&lt;/div&gt;</original-body-html>
  </ticket>
  <ticket>
    <assigned-user-id type="integer">424</assigned-user-id>
    <attachments-count type="integer">1</attachments-count>
    <closed type="boolean">true</closed>
    <created-at type="datetime">2008-05-14T19:28:27+01:00</created-at>
    <creator-id type="integer">19965</creator-id>
    <milestone-due-on type="datetime" nil="true"></milestone-due-on>
    <milestone-id type="integer">9903</milestone-id>
    <number type="integer">198</number>
    <permalink>caches_action-with-layout-option</permalink>
    <priority type="integer">10</priority>
    <project-id type="integer">8994</project-id>
    <raw-data type="binary" nil="true" encoding="base64"></raw-data>
    <state>resolved</state>
    <tag>actionpack patch tested</tag>
    <title>caches_action with :layout option</title>
    <updated-at type="datetime">2008-06-03T20:04:16+01:00</updated-at>
    <user-id type="integer">17393</user-id>
    <user-name>Repository</user-name>
    <creator-name>Jos&#233; Valim</creator-name>
    <assigned-user-name>Joshua Peek</assigned-user-name>
    <url>http://rails.lighthouseapp.com/projects/8994/tickets/198</url>
    <milestone-title>2.x</milestone-title>
    <original-body>Added :layout to caches_action method.

If you specify :layout =&gt; false, the layout will not be cached, only the action content. This is useful if you have dynamic content in your layout (which is true for most applications).

This is useful to avoid fragment caching in the whole action and is faster also.

If the :layout is not set or set to true, we have the default behavior.

Tests added.</original-body>
    <latest-body>Added :layout to caches_action method.

If you specify :layout =&gt; false, the layout will not be cached, only the action content. This is useful if you have dynamic content in your layout (which is true for most applications).

This is useful to avoid fragment caching in the whole action and is faster also.

If the :layout is not set or set to true, we have the default behavior.

Tests added.</latest-body>
    <original-body-html>&lt;div&gt;&lt;p&gt;
Added :layout to caches_action method.
&lt;/p&gt;&lt;p&gt;
If you specify :layout =&gt; false, the layout will not be cached, only the action content. This is useful if you have dynamic content in your layout (which is true for most applications).
&lt;/p&gt;&lt;p&gt;
This is useful to avoid fragment caching in the whole action and is faster also.
&lt;/p&gt;&lt;p&gt;
If the :layout is not set or set to true, we have the default behavior.
&lt;/p&gt;&lt;p&gt;
Tests added.
&lt;/p&gt;&lt;/div&gt;</original-body-html>
  </ticket>
</tickets>
