Module: Polytag::Concerns::Taggable::AssociationExtensions

Defined in:
lib/polytag/concerns/taggable/association_extensions.rb

Instance Method Summary collapse

Instance Method Details

#no_tag_groupObject



9
10
11
# File 'lib/polytag/concerns/taggable/association_extensions.rb', line 9

def no_tag_group
  where(polytag_tag_group_id: nil, owner_type: nil, owner_id: nil)
end

#tag_group(args = {}) ⇒ Object



5
6
7
# File 'lib/polytag/concerns/taggable/association_extensions.rb', line 5

def tag_group(args = {})
  includes(:tag_group).merge(::Polytag.get(tag_group: args[:tag_group], owner: args[:tag_group_owner]))
end