Fix misc rubocop warnings.

This commit is contained in:
evazion
2020-06-16 21:36:15 -05:00
parent dc460aab53
commit b551e3634f
25 changed files with 75 additions and 95 deletions

View File

@@ -106,10 +106,7 @@ module PaginationExtension
def total_count
@paginator_count ||= unscoped.from(except(:offset, :limit, :order).reorder(nil)).count
rescue ActiveRecord::StatementInvalid => e
if e.to_s =~ /statement timeout/
@paginator_count ||= 1_000_000
else
raise
end
raise unless e.to_s =~ /statement timeout/
@paginator_count ||= 1_000_000
end
end