app/controllers/deposit/collection_controller.rb in killbill-deposit-0.0.4 vs app/controllers/deposit/collection_controller.rb in killbill-deposit-0.1.1
- old
+ new
@@ -57,12 +57,12 @@
searcher = lambda do |search_key, _offset, _limit|
account = begin
KillBillClient::Model::Account.find_by_id(search_key, false, false,
cached_options_for_klient)
- rescue StandardError
- nil
+ rescue StandardError
+ nil
end
if account.nil?
[]
else
account.invoices(cached_options_for_klient)
@@ -119,10 +119,10 @@
b = data_extractor.call(b, ordering_column)
sort = a <=> b
sort.nil? ? -1 : sort
end
end
- pages.reverse! if ordering_dir == 'desc' && limit >= 0 || ordering_dir == 'asc' && limit.negative?
+ pages.reverse! if (ordering_dir == 'desc' && limit >= 0) || (ordering_dir == 'asc' && limit.negative?)
pages.each { |page| json[:data] << formatter.call(page) }
respond_to do |format|
format.json { render json: json }