jackdempsey / acts_as_commentable

The ActiveRecord acts_as_commentable plugin
http://juixe.com/svn/acts_as_commentable/
MIT License
834 stars 176 forks source link

acts_as_commentable overrides order set in :recent named scope #1

Closed nmeans closed 14 years ago

nmeans commented 15 years ago

The :order => "created_at ASC" in the acts_as_commentable definition in lib/acts_as_commentable.rb overrides the "created_at DESC" in the :recent named scope, generating a query like "ORDER BY created_at ASC, created_at DESC".

This should be reproducible by calling #comments.recent on any commentable model with multiple comments.

Should be resolvable by removing the :order param in the acts_as_commentable definition unless I'm overlooking something. Glad to provide a pull request if you'd like, but likely not worth it given the simplicity of the fix.

ghost commented 14 years ago

Yeah I've discovered the same issue

jackdempsey commented 14 years ago

Just saw this issue. Will take a look at it later and push a fix.

jackdempsey commented 14 years ago

Closing old bug that shouldn't be in play anymore (verified in a rails 3 app--if anyone has issues please reopen and document)