Class: MOCO::Tag
- Inherits:
-
BaseEntity
- Object
- BaseEntity
- MOCO::Tag
- Defined in:
- lib/moco/entities/tag.rb
Overview
Represents a MOCO tag/label
Required attributes for create:
name - String, tag name (e.g., "Important")
context - String, entity type this tag applies to:
"Project", "Contact", "Company", "Deal", "Offer",
"Invoice", "Purchase", "User"
Read-only attributes:
id, created_at, updated_at
Example:
moco..create(
name: "Priority",
context: "Project"
)
Note:
To apply tags to entities, use the `tags` attribute when
creating/updating the entity: { tags: ["Tag1", "Tag2"] }
Instance Attribute Summary
Attributes inherited from BaseEntity
Instance Method Summary collapse
Methods inherited from BaseEntity
#==, #association, #destroy, #eql?, #has_many, #hash, #id, #initialize, #inspect, #reload, #save, #to_h, #to_json, #update
Constructor Details
This class inherits a constructor from MOCO::BaseEntity
Instance Method Details
#to_s ⇒ Object
26 27 28 |
# File 'lib/moco/entities/tag.rb', line 26 def to_s name.to_s end |