This project is archived and is in readonly mode.

#602 ✓resolved
Tiago Macedo

Quoting issues in AR's association preload

Reported by Tiago Macedo | July 11th, 2008 @ 04:27 AM | in 2.x

If you look at the source code, there's even a FIXME there:

  1. FIXME: quoting

def preload_belongs_to_association(records, reflection, preload_options={})

The new eager loading mechanisms incorrectly quotes all primary keys when doing a preload. Obviously this shouldn't be done (at least) for integers and floats.

The information about the "numeric" columns [:integer, :float] was found in


This patch doesn't include tests (but didn't break any either) as I couldn't find a decent way to test this.

This is similar to this fix: for Rails 1.x

Comments and changes to this ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href=""></a>

Referenced by