This project is archived and is in readonly mode.

#3501 ✓resolved
Christoph Petschnig

[PATCH] Rails 3.0: each_with_index fails

Reported by Christoph Petschnig | November 21st, 2009 @ 11:12 PM | in 3.0.2

When using method :each_with_index on a query result (like MyModel.find :all), Rails fails with message:

undefined method my_model_column_name' for #<Arel::Row:0x9ed7fc0>

The solution is to delegate :each_with_index in activerecord/lib/active_record/relation.rb

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="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>

Pages