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

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

@MoJafer

Description

@MoJafer

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions