Convert all the external uses of tag_master to tag_definitions
This commit is contained in:
parent
29ae298393
commit
a52b539449
3 changed files with 9 additions and 9 deletions
|
@ -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
|
||||
|
|
|
@ -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>;
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue