This project is archived and is in readonly mode.

eager loading fails with ArgumentError
Reported by Claudio Poli | August 28th, 2008 @ 04:13 AM | in 2.x
hi, a simple eager loading like
@account = Account.find(params[:id], :include => :group) # belongs_to
results in
vendor/rails/activerecord/lib/active_record/association_preload.rb:13:in `respond_to?'
vendor/rails/activerecord/lib/active_record/association_preload.rb:13:in `flatten'
vendor/rails/activerecord/lib/active_record/association_preload.rb:13:in `preload_associations'
vendor/rails/activerecord/lib/active_record/base.rb:1424:in `find_every'
vendor/rails/activerecord/lib/active_record/base.rb:1457:in `find_one'
vendor/rails/activerecord/lib/active_record/base.rb:1443:in `find_from_ids'
vendor/rails/activerecord/lib/active_record/base.rb:570:in `find'
app/controllers/administration/accounts_controller.rb:36:in `show'
on edge rails.
Comments and changes to this ticket
- 
            
         Claudio Poli August 28th, 2008 @ 04:15 AM- Title changed from eager loading fails to eager loading fails with ArgumentError
 whops, forgot the important exception ArgumentError in Administration/accountsController#show wrong number of arguments (2 for 1)backtrace is in ticket post. 
- 
            
         Claudio Poli August 28th, 2008 @ 04:32 AMI'm using ruby 1.8.7 (2008-06-20 patchlevel 22) [i686-darwin9.3.0]. I've read some other ticket about similar issues on specific ruby versions, so here goes. 
- 
         Jeremy Kemper August 28th, 2008 @ 05:16 AM- State changed from new to invalid
 This works for me. Please include a failing test case. 
- 
            
         Claudio Poli August 28th, 2008 @ 05:24 AMafter a bit of research I just found out that a collegue did a respond_to? override in a model, without specifying the arguments parameter and without tests. sorry for the noise. 
- 
         
- 
            
         
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>
 Jeremy Kemper
      Jeremy Kemper