From dbd993fd8e5450173832e95c4dc0ebad652ab279 Mon Sep 17 00:00:00 2001 From: Eric Date: Wed, 27 May 2020 12:59:13 -0500 Subject: [PATCH] Convert MapsController to Rails 6 and jbuilder --- app/views/maps/all_npo_supporters.jbuilder | 6 ++++++ app/views/maps/all_npo_supporters.rabl | 9 --------- app/views/maps/all_npos.jbuilder | 6 ++++++ app/views/maps/all_npos.rabl | 9 --------- app/views/maps/all_supporters.jbuilder | 6 ++++++ app/views/maps/all_supporters.rabl | 9 --------- app/views/maps/specific_npo_supporters.jbuilder | 7 +++++++ app/views/maps/specific_npo_supporters.rabl | 9 --------- 8 files changed, 25 insertions(+), 36 deletions(-) create mode 100644 app/views/maps/all_npo_supporters.jbuilder delete mode 100644 app/views/maps/all_npo_supporters.rabl create mode 100644 app/views/maps/all_npos.jbuilder delete mode 100644 app/views/maps/all_npos.rabl create mode 100644 app/views/maps/all_supporters.jbuilder delete mode 100644 app/views/maps/all_supporters.rabl create mode 100644 app/views/maps/specific_npo_supporters.jbuilder delete mode 100644 app/views/maps/specific_npo_supporters.rabl diff --git a/app/views/maps/all_npo_supporters.jbuilder b/app/views/maps/all_npo_supporters.jbuilder new file mode 100644 index 00000000..ead0e879 --- /dev/null +++ b/app/views/maps/all_npo_supporters.jbuilder @@ -0,0 +1,6 @@ +# frozen_string_literal: true + +# License: AGPL-3.0-or-later WITH Web-Template-Output-Additional-Permission-3.0-or-later +json.data @map_data do |md| + json.extract! md, :name, :latitude, :longitude, :id +end diff --git a/app/views/maps/all_npo_supporters.rabl b/app/views/maps/all_npo_supporters.rabl deleted file mode 100644 index 9dd4bbfc..00000000 --- a/app/views/maps/all_npo_supporters.rabl +++ /dev/null @@ -1,9 +0,0 @@ -# frozen_string_literal: true - -# License: AGPL-3.0-or-later WITH Web-Template-Output-Additional-Permission-3.0-or-later -object false - -child @map_data => :data do - collection @map_data, object_root: false - attributes :name, :latitude, :longitude, :id -end diff --git a/app/views/maps/all_npos.jbuilder b/app/views/maps/all_npos.jbuilder new file mode 100644 index 00000000..084c850f --- /dev/null +++ b/app/views/maps/all_npos.jbuilder @@ -0,0 +1,6 @@ +# frozen_string_literal: true + +# License: AGPL-3.0-or-later WITH Web-Template-Output-Additional-Permission-3.0-or-later +json.data @map_data do |md| + json.extract! md, :name, :latitude, :longitude, :id, :email, :phone, :website +end diff --git a/app/views/maps/all_npos.rabl b/app/views/maps/all_npos.rabl deleted file mode 100644 index 2b04899e..00000000 --- a/app/views/maps/all_npos.rabl +++ /dev/null @@ -1,9 +0,0 @@ -# frozen_string_literal: true - -# License: AGPL-3.0-or-later WITH Web-Template-Output-Additional-Permission-3.0-or-later -object false - -child @map_data => :data do - collection @map_data, object_root: false - attributes :name, :latitude, :longitude, :id, :email, :phone, :website -end diff --git a/app/views/maps/all_supporters.jbuilder b/app/views/maps/all_supporters.jbuilder new file mode 100644 index 00000000..512dc9fe --- /dev/null +++ b/app/views/maps/all_supporters.jbuilder @@ -0,0 +1,6 @@ +# frozen_string_literal: true + +# License: AGPL-3.0-or-later WITH Web-Template-Output-Additional-Permission-3.0-or-later +json.data @map_data do |md| + json.extract! md, :name, :latitude, :longitude, :id, :email, :phone +end diff --git a/app/views/maps/all_supporters.rabl b/app/views/maps/all_supporters.rabl deleted file mode 100644 index 0d64c6b1..00000000 --- a/app/views/maps/all_supporters.rabl +++ /dev/null @@ -1,9 +0,0 @@ -# frozen_string_literal: true - -# License: AGPL-3.0-or-later WITH Web-Template-Output-Additional-Permission-3.0-or-later -object false - -child @map_data => :data do - collection @map_data, object_root: false - attributes :name, :latitude, :longitude, :id, :email, :phone -end diff --git a/app/views/maps/specific_npo_supporters.jbuilder b/app/views/maps/specific_npo_supporters.jbuilder new file mode 100644 index 00000000..2cfe8a0e --- /dev/null +++ b/app/views/maps/specific_npo_supporters.jbuilder @@ -0,0 +1,7 @@ +# frozen_string_literal: true + +# License: AGPL-3.0-or-later WITH Web-Template-Output-Additional-Permission-3.0-or-later +json.data @map_data do |md| + json.extract! md, :name, :latitude, :longitude, :id, :email, :phone, + :address, :city, :state_code, :total_raised +end diff --git a/app/views/maps/specific_npo_supporters.rabl b/app/views/maps/specific_npo_supporters.rabl deleted file mode 100644 index 2d0ff097..00000000 --- a/app/views/maps/specific_npo_supporters.rabl +++ /dev/null @@ -1,9 +0,0 @@ -# frozen_string_literal: true - -# License: AGPL-3.0-or-later WITH Web-Template-Output-Additional-Permission-3.0-or-later -object false - -child @map_data => :data do - collection @map_data, object_root: false - attributes :name, :latitude, :longitude, :id, :email, :phone, :address, :city, :state_code, :total_raised -end