Closed nmeans closed 14 years ago
Yeah I've discovered the same issue
Just saw this issue. Will take a look at it later and push a fix.
Closing old bug that shouldn't be in play anymore (verified in a rails 3 app--if anyone has issues please reopen and document)
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.