mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-13 19:54:02 +00:00
Merge pull request #2656 from AndrewKvalheim/ajax-datatables-rails-293-postgresql
Fix bug in UserDatatable query affecting PostgreSQL
This commit is contained in:
commit
754c47e41b
1 changed files with 4 additions and 2 deletions
|
|
@ -47,12 +47,14 @@ class UserDatatable < AjaxDatatablesRails::Base
|
|||
end
|
||||
# rubocop:enable Naming/AccessorMethodName
|
||||
|
||||
# Workaround for jbox-web/ajax-datatables-rails#293
|
||||
def records_total_count
|
||||
fetch_records.unscope(:group).count(:all)
|
||||
fetch_records.unscope(:group, :select).count(:all)
|
||||
end
|
||||
|
||||
# Workaround for jbox-web/ajax-datatables-rails#293
|
||||
def records_filtered_count
|
||||
filter_records(fetch_records).unscope(:group).count(:all)
|
||||
filter_records(fetch_records).unscope(:group, :select).count(:all)
|
||||
end
|
||||
|
||||
# ==== These methods represent the basic operations to perform on records
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue