Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

uninitialized constant ActiveRecord::Associations::AssociationCollection error with rails 3.1 edge #124

Closed
djtal opened this Issue Apr 14, 2011 · 11 comments

Comments

Projects
None yet
9 participants

djtal commented Apr 14, 2011

Hi try to play with rails 3.1 I've got an error when starting the application

/Users/djtal/.rvm/gems/ruby-1.9.2-p180/gems/will_paginate-3.0.pre2/lib/will_paginate/finders/active_record.rb:36:in `enable!': uninitialized constant ActiveRecord::Associations::AssociationCollection (NameError)

I've test with just a newly created app and adding

gem 'will_paginate', '~> 3.0.beta'

in the gem file.

Any hints a solution exist for this ?

Thanks

djtal commented Apr 15, 2011

After some search this morning I've found taht this class might be renamed in CollectionAssociation

see https://github.com/rails/rails/blob/master/activerecord/lib/active_record/associations/collection_association.rb in rails master
and https://github.com/rails/rails/blob/3-0-7/activerecord/lib/active_record/associations/association_collection.rb in rails 3.0.7

I'll try to change that in will_paginate code tonight at home and see what happen.

i just ran into this, too. :)

djtal commented Apr 29, 2011

you see issue #125 which change this behaviour to fix it.

Watch out djtal. Issue #125 resolved by Jack Danger is a fork from the current master of will_paginate that is intended for rails2.3.x ...

Othella commented May 29, 2011

Yes, AssociationCollection changing to CollectionAssociation fix the problem!

We've forked off a copy of the will_paginate project and created a rails3-1 branch for dealing with this issue and any future rails 3.1 compatibility issues that we run into.

https://github.com/xspond/will_paginate/tree/rails3-1

Just posting here to follow this issue. (Is there a way to follow an issue without commenting?)

shedd commented Jun 23, 2011

@mhuggins - at the bottom of the page, "Enable notifications for this issue" allows you to follow an issue without having to post a comment.

Owner

mislav commented Jul 26, 2011

Fixed in "3.0.pre4" release (the rails3 branch).

@mislav mislav closed this Jul 26, 2011

Awesome, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment