From fb34e8e2920cc993a841029ea1c8d16132093e07 Mon Sep 17 00:00:00 2001 From: Justin Edmund Date: Wed, 16 Sep 2020 23:49:25 -0700 Subject: [PATCH] Updating templates --- app/views/api/v1/grid_weapons/base.json.rabl | 4 ++++ app/views/api/v1/grid_weapons/show.json.rabl | 6 ------ app/views/api/v1/party/base.json.rabl | 6 +++++- 3 files changed, 9 insertions(+), 7 deletions(-) create mode 100644 app/views/api/v1/grid_weapons/base.json.rabl delete mode 100644 app/views/api/v1/grid_weapons/show.json.rabl diff --git a/app/views/api/v1/grid_weapons/base.json.rabl b/app/views/api/v1/grid_weapons/base.json.rabl new file mode 100644 index 0000000..e8cb439 --- /dev/null +++ b/app/views/api/v1/grid_weapons/base.json.rabl @@ -0,0 +1,4 @@ +attributes :id, + :mainhand, + :position, + :weapon \ No newline at end of file diff --git a/app/views/api/v1/grid_weapons/show.json.rabl b/app/views/api/v1/grid_weapons/show.json.rabl deleted file mode 100644 index f63ca1a..0000000 --- a/app/views/api/v1/grid_weapons/show.json.rabl +++ /dev/null @@ -1,6 +0,0 @@ -object @weapon - -attributes :id, - :party_id, - :weapon_id, - :position \ No newline at end of file diff --git a/app/views/api/v1/party/base.json.rabl b/app/views/api/v1/party/base.json.rabl index 71ddcd3..403e94a 100644 --- a/app/views/api/v1/party/base.json.rabl +++ b/app/views/api/v1/party/base.json.rabl @@ -1,3 +1,7 @@ object :party -attributes :id, :shortcode \ No newline at end of file +attributes :id, :shortcode + +node :grid do |p| + partial('grid_weapons/base', :object => p.weapons) +end