module RelatesObjectTags

For designating which object a published piece of content is related to. Other objects may also say which objects they are interested in so they can pull in related content.

Public Instance Methods

all_object_tags() click to toggle source

Returns an array of related_object_tags plus my_object_tag

# File lib/buweb/concerns/relates_object_tags.rb, line 57
def all_object_tags
  (Array(my_object_tag.presence) + Array(related_object_tags)).compact.uniq
end
destroy_all_relationships!() click to toggle source
# File lib/buweb/concerns/relates_object_tags.rb, line 11
def destroy_all_relationships!
  Relationship.by_base_object(self).destroy_all
  Relationship.by_related_object(self).destroy_all
end