mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-13 19:54:02 +00:00
Change quotes style for better DB compatibility
Postgres 10 doesn't like the double-quoted values.
This commit is contained in:
parent
34658d2696
commit
c32c9962d1
1 changed files with 4 additions and 2 deletions
|
|
@ -40,8 +40,10 @@ class UserDatatable < AjaxDatatablesRails::Base
|
|||
|
||||
# rubocop:disable Naming/AccessorMethodName
|
||||
def get_raw_records
|
||||
User.left_outer_joins(:registrations, :roles).distinct
|
||||
.select('users.*, COUNT(CASE WHEN registrations.attended = "t" THEN 1 END) AS attended_count').group('users.id')
|
||||
User.left_outer_joins(:registrations, :roles)
|
||||
.distinct
|
||||
.select("users.*, COUNT(CASE WHEN registrations.attended = 't' THEN 1 END) AS attended_count")
|
||||
.group('users.id')
|
||||
end
|
||||
# rubocop:enable Naming/AccessorMethodName
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue