Convert MapsController to Rails 6 and jbuilder

This commit is contained in:
Eric 2020-05-27 12:59:13 -05:00
parent b02aa85e58
commit dbd993fd8e
8 changed files with 25 additions and 36 deletions

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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