View Source Bonfire.Tag.Tagged (Bonfire v0.9.11-social-beta.6)

A mixin used for associating tags with an object

Summary

Types

t()

@type t() :: %Bonfire.Tag.Tagged{
  __meta__: Ecto.Schema.Metadata.t(),
  activity: term(),
  count: term(),
  id: Needle.UID.t() | nil,
  inserted_at: term(),
  pointer: Ecto.Schema.belongs_to(Needle.Pointer.t()) | nil,
  tag: term(),
  tag_id: term(),
  updated_at: term()
}

Functions

all()

changeset(struct, params \\ %{})

delete(struct, key)

get(struct, key, default \\ nil)

latest(thing_id)

Get the latest tag added to a thing

put(struct, key, val)

q_with_tag(tag_id)

List the things tagged with a certain tag

q_with_thing(thing_id)

List the tags of a thing

q_with_type(types)

List by type of tagged thing

search_query(text, opts)

thing_tags_insert(thing, tags)

with_tag(tag_id)

with_thing(thing_id)

with_type(types)