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)
|
def to_builder(*expand)
|
||||||
Jbuilder.new do |tag|
|
Jbuilder.new do |tag|
|
||||||
tag.(self, :id, :name, :deleted)
|
tag.(self, :id, :name, :deleted)
|
||||||
tag.object 'tag_master'
|
tag.object 'tag_definition'
|
||||||
if expand.include? :nonprofit && nonprofit
|
if expand.include? :nonprofit && nonprofit
|
||||||
tag.nonprofit nonprofit.to_builder
|
tag.nonprofit nonprofit.to_builder
|
||||||
else
|
else
|
||||||
|
|
|
@ -3,18 +3,18 @@
|
||||||
import type { HoudiniEvent, HoudiniObject, IdType } from "../common";
|
import type { HoudiniEvent, HoudiniObject, IdType } from "../common";
|
||||||
import type Nonprofit from './';
|
import type Nonprofit from './';
|
||||||
|
|
||||||
export interface TagMaster extends HoudiniObject {
|
export interface TagDefinition extends HoudiniObject {
|
||||||
deleted: boolean;
|
deleted: boolean;
|
||||||
name: string;
|
name: string;
|
||||||
nonprofit: IdType | Nonprofit;
|
nonprofit: IdType | Nonprofit;
|
||||||
object: 'tag_master';
|
object: 'tag_definition';
|
||||||
}
|
}
|
||||||
|
|
||||||
/** POST /nonprofits/:id/tag_masters */
|
/** POST /nonprofits/:id/tag_definitions */
|
||||||
export interface CreateTagMaster {
|
export interface CreateTagDefinition {
|
||||||
name: string;
|
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,
|
'deleted' => false,
|
||||||
'name' => name,
|
'name' => name,
|
||||||
'nonprofit'=> nonprofit.id,
|
'nonprofit'=> nonprofit.id,
|
||||||
'object' => 'tag_master'
|
'object' => 'tag_definition'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
@ -44,7 +44,7 @@ RSpec.describe TagMaster, type: :model do
|
||||||
'deleted' => true,
|
'deleted' => true,
|
||||||
'name' => name,
|
'name' => name,
|
||||||
'nonprofit'=> nonprofit.id,
|
'nonprofit'=> nonprofit.id,
|
||||||
'object' => 'tag_master'
|
'object' => 'tag_definition'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}).ordered
|
}).ordered
|
||||||
|
|
Loading…
Reference in a new issue