You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
i wanted to fork it to make some feature updates but ran into a couple issues while trying to figure out the code:
this query in mixer.rb is giving me an issue because of the Distinct & Random() combination, but I don't know enough about ruby or Active Record to fix it
SELECT DISTINCT"users".*FROM"users"INNER JOIN"group_users"ON"group_users"."user_id"="users"."id"INNER JOIN"groups"ON"groups"."id"="group_users"."group_id"WHERE"groups"."name"='trust_level_1'AND (users.id>0) AND (NOT EXISTS(
SELECT1FROM anonymous_users a
WHEREa.user_id=users.id
)) AND (suspended_till IS NULLOR suspended_till <='2020-07-18 05:11:27.079563') AND"users"."active"= TRUE ORDER BY RANDOM()
which gives this error:
Job exception: PG::InvalidColumnReference: ERROR: for SELECT DISTINCT, ORDER BY expressions must appear in select list
LINE 5: ...11:27.079563') AND "users"."active" = TRUE ORDER BY RANDOM()
when i debugged this using the data explorer plugin, i found the query works okay without the DISTINCT included, but I'm not sure how to get that into ActiveRecord / ruby syntax.. any help?
& totally unrelated but i also got a missing keyword at error from this line in mingle.rb
Hi, thanks for this plugin!
i wanted to fork it to make some feature updates but ran into a couple issues while trying to figure out the code:
mixer.rb
is giving me an issue because of the Distinct & Random() combination, but I don't know enough about ruby or Active Record to fix itturns into this raw SQL
which gives this error:
when i debugged this using the data explorer plugin, i found the query works okay without the
DISTINCT
included, but I'm not sure how to get that into ActiveRecord / ruby syntax.. any help?& totally unrelated but i also got a
missing keyword at
error from this line inmingle.rb
The text was updated successfully, but these errors were encountered: