lib/pragma/operation/index.rb in pragma-1.2.5 vs lib/pragma/operation/index.rb in pragma-1.2.6
- old
+ new
@@ -14,11 +14,13 @@
begin
context.records = context.records.paginate(page: page, per_page: per_page)
rescue RangeError => e
respond_with!(
status: :bad_request,
- error_type: :invalid_page,
- error_message: e.message
+ resource: {
+ error_type: :invalid_page,
+ error_message: e.message
+ }
)
end
respond_with(
resource: decorate(context.records),