From a52b539449900ec70139490cab6c3ad50a9552f3 Mon Sep 17 00:00:00 2001 From: Eric Schultz Date: Tue, 2 Feb 2021 11:41:59 -0600 Subject: [PATCH] Convert all the external uses of tag_master to tag_definitions --- app/models/tag_master.rb | 2 +- docs/event_definitions/Nonprofit/TagDefinition.ts | 12 ++++++------ spec/models/tag_master_spec.rb | 4 ++-- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/app/models/tag_master.rb b/app/models/tag_master.rb index 7c36b650..bd67a097 100644 --- a/app/models/tag_master.rb +++ b/app/models/tag_master.rb @@ -43,7 +43,7 @@ class TagMaster < ApplicationRecord def to_builder(*expand) Jbuilder.new do |tag| tag.(self, :id, :name, :deleted) - tag.object 'tag_master' + tag.object 'tag_definition' if expand.include? :nonprofit && nonprofit tag.nonprofit nonprofit.to_builder else diff --git a/docs/event_definitions/Nonprofit/TagDefinition.ts b/docs/event_definitions/Nonprofit/TagDefinition.ts index 66ffc33e..5706db41 100644 --- a/docs/event_definitions/Nonprofit/TagDefinition.ts +++ b/docs/event_definitions/Nonprofit/TagDefinition.ts @@ -3,18 +3,18 @@ import type { HoudiniEvent, HoudiniObject, IdType } from "../common"; import type Nonprofit from './'; -export interface TagMaster extends HoudiniObject { +export interface TagDefinition extends HoudiniObject { deleted: boolean; name: string; nonprofit: IdType | Nonprofit; - object: 'tag_master'; + object: 'tag_definition'; } -/** POST /nonprofits/:id/tag_masters */ -export interface CreateTagMaster { +/** POST /nonprofits/:id/tag_definitions */ +export interface CreateTagDefinition { name: string; } -export type TagMasterCreated = HoudiniEvent<'tag_master.created', TagMaster>; +export type TagMasterCreated = HoudiniEvent<'tag_definition.created', TagDefinition>; -export type TagMasterDeleted = HoudiniEvent<'tag_master.deleted', TagMaster>; \ No newline at end of file +export type TagMasterDeleted = HoudiniEvent<'tag_definition.deleted', TagDefinition>; \ No newline at end of file diff --git a/spec/models/tag_master_spec.rb b/spec/models/tag_master_spec.rb index 61feb57b..54135852 100644 --- a/spec/models/tag_master_spec.rb +++ b/spec/models/tag_master_spec.rb @@ -24,7 +24,7 @@ RSpec.describe TagMaster, type: :model do 'deleted' => false, 'name' => name, 'nonprofit'=> nonprofit.id, - 'object' => 'tag_master' + 'object' => 'tag_definition' } } }) @@ -44,7 +44,7 @@ RSpec.describe TagMaster, type: :model do 'deleted' => true, 'name' => name, 'nonprofit'=> nonprofit.id, - 'object' => 'tag_master' + 'object' => 'tag_definition' } } }).ordered