Module: PagesCore::Taggable::ClassMethods

Defined in:
app/models/concerns/pages_core/taggable.rb

Instance Method Summary collapse

Instance Method Details

#tagged_with(*tags) ⇒ Object


14
15
16
17
18
19
# File 'app/models/concerns/pages_core/taggable.rb', line 14

def tagged_with(*tags)
  all
    .includes(:tags)
    .where("tags.name IN (?)", Tag.parse(tags))
    .references(:tags)
end