diff --git a/Gemfile b/Gemfile index 827f50a4..d140ef3f 100755 --- a/Gemfile +++ b/Gemfile @@ -11,7 +11,6 @@ gem 'hamster', '~> 3.0' # Thread-safe collection classes for Ruby gem 'parallel', '~> 1.17' # run processes in parallel gem 'puma_worker_killer', '~> 0.1.1' # TODO: Investigate why puma workers need to be killed. gem 'puma', '~> 4.0', '>= 4.0.1' -gem 'rabl', '~> 0.14.1' # JSON serialization https://github.com/nesquena/rabl gem 'rake', '~> 12.3.2' gem 'sassc-rails', '~> 2.1', '>= 2.1.2' gem 'sassc', '~> 2.0', '>= 2.0.1' diff --git a/Gemfile.lock b/Gemfile.lock index 7a336169..4e54bb6e 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -265,8 +265,6 @@ GEM puma_worker_killer (0.1.1) get_process_mem (~> 0.2) puma (>= 2.7, < 5) - rabl (0.14.1) - activesupport (>= 2.3.14) rack (2.2.2) rack-attack (5.4.2) rack (>= 1.0, < 3) @@ -468,7 +466,6 @@ DEPENDENCIES puma (~> 4.0, >= 4.0.1) puma_worker_killer (~> 0.1.1) qx! - rabl (~> 0.14.1) rack-attack (~> 5.2) rack-ssl (~> 1.4) rack-timeout (~> 0.5.1) diff --git a/NOTICE-ruby b/NOTICE-ruby index b07b584e..5b002cf3 100644 --- a/NOTICE-ruby +++ b/NOTICE-ruby @@ -3451,9 +3451,6 @@ Copyright (c) 2013 Michael Grosser ** parallel_tests; version 2.32.0 -- ** puma_worker_killer; version 0.1.1 -- ** qx; version 0.1.1 -- -** rabl; version 0.14.1 -- -Copyright (c) 2010 Nathan Esquenazi -Copyright (c) 2011-2013 Nathan Esquenazi. ** rack; version 2.2.2 -- Copyright (c) 2009-2018 Michael Fellinger Copyright (c) Django Software Foundation and individual contributors. diff --git a/app/controllers/nonprofits/refunds_controller.rb b/app/controllers/nonprofits/refunds_controller.rb index 8afa35e8..397fe659 100644 --- a/app/controllers/nonprofits/refunds_controller.rb +++ b/app/controllers/nonprofits/refunds_controller.rb @@ -18,6 +18,7 @@ module Nonprofits def index charge = current_nonprofit.charges.find(params[:charge_id]) @refunds = charge.refunds + render locals: {refunds: @refund}} end private diff --git a/config/initializers/rabl_init.rb b/app/views/nonprofits/refunds/index.jbuilder similarity index 54% rename from config/initializers/rabl_init.rb rename to app/views/nonprofits/refunds/index.jbuilder index 8d1da391..25fdeec1 100644 --- a/config/initializers/rabl_init.rb +++ b/app/views/nonprofits/refunds/index.jbuilder @@ -1,7 +1,6 @@ # frozen_string_literal: true # License: AGPL-3.0-or-later WITH Web-Template-Output-Additional-Permission-3.0-or-later -require 'rabl' -Rabl.configure do |config| - config.enable_json_callbacks = true -end +json.data refunds do |refund| + json.extract refund, :id, :amount, :created_at, :reason, :comment +end \ No newline at end of file