Skip to content
This repository has been archived by the owner on Nov 13, 2021. It is now read-only.

get rank for user doesn't work with postgresql #95

Open
MoJafer opened this issue Nov 19, 2016 · 0 comments
Open

get rank for user doesn't work with postgresql #95

MoJafer opened this issue Nov 19, 2016 · 0 comments

Comments

@MoJafer
Copy link

MoJafer commented Nov 19, 2016

Welcome

i just want to get a rank for current user
I'am did current_user.rank _for(:total_points)

then I get this error when i use postgresql while its work whitout any issue on sqlite3

PG::WrongObjectType: ERROR: count(*) must be used to call a parameterless aggregate function
LINE 1: SELECT COUNT() FROM "users" LEFT JOIN rs_reputations ON user...
^
: SELECT COUNT() FROM "users" LEFT JOIN rs_reputations ON users.id = rs_reputations.target_id AND rs_reputations.target_type = 'User' AND rs_reputations.reputation_name = 'total_points' AND rs_reputations.active = 't' WHERE (rs_reputations.value > 0.0)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant