Fix StatementInvalid for queries
This commit is contained in:
parent
a6e5f9b5c3
commit
55b18816b1
@ -144,7 +144,7 @@ module AdditionalsQuery
|
||||
def query_count
|
||||
objects_scope.count
|
||||
rescue ::ActiveRecord::StatementInvalid => e
|
||||
raise StatementInvalid, e.message
|
||||
raise queried_class::StatementInvalid, e.message
|
||||
end
|
||||
|
||||
def results_scope(options = {})
|
||||
@ -156,7 +156,7 @@ module AdditionalsQuery
|
||||
.limit(options[:limit])
|
||||
.offset(options[:offset])
|
||||
rescue ::ActiveRecord::StatementInvalid => e
|
||||
raise StatementInvalid, e.message
|
||||
raise queried_class::StatementInvalid, e.message
|
||||
end
|
||||
end
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user