Convert all the external uses of tag_master to tag_definitions

This commit is contained in:
Eric Schultz 2021-02-02 11:41:59 -06:00 committed by Eric Schultz
parent 29ae298393
commit a52b539449
3 changed files with 9 additions and 9 deletions

View file

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

View file

@ -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>;
export type TagMasterDeleted = HoudiniEvent<'tag_definition.deleted', TagDefinition>;

View file

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