Merge branch 'misc-release-tweaks' into remove-schedule

* misc-release-tweaks: (38 commits)
  Improve markdown support and tweak sponsorship langage
  Use Ruby 2.5.5 since that is in the docker dev container
  Do not need to specify callback url
  attempt to fix the discourse callback URL
  use a div with padding.
  Help button is weird.
  Dropdown menu style tweaks
  fix logic for snap sso link
  tweak form display in dropdown
  Tweak devise modules list
  Work on omniauth setup
  Minor HTML cleanup
  More CSS-y things
  BJC-ify a bunch of styles
  More wording tweaks
  Tweak some wording, html and descriptions for Snap!Con
  Enable a bunch more markdown options.
  Delete some unnecessary files
  attempt one more fix
  readd back the group by
  ...
This commit is contained in:
Michael Ball 2020-01-05 15:44:35 -08:00
commit b49bddafb6
25 changed files with 170 additions and 156 deletions

View file

@ -40,19 +40,20 @@ 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).select(
"DISTINCT users.id, users.name, users.email, users.confirmed_at, COUNT(CASE WHEN registrations.attended = 't' THEN 1 END) AS attended_count"
).group(
'users.id, users.name, users.email, users.confirmed_at'
)
end
# rubocop:enable Naming/AccessorMethodName
def records_total_count
fetch_records.unscope(:group).count(:all)
fetch_records.unscoped.count(:id)
end
def records_filtered_count
filter_records(fetch_records).unscope(:group).count(:all)
filter_records(fetch_records).unscoped.count
end
# ==== These methods represent the basic operations to perform on records