Module: Shared::Taggable::ClassMethods

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

Instance Method Summary (collapse)

Instance Method Details

- (Scope) tagged_with_keyword(keyword)

Returns only those instances with tags that use the kewyord

Returns:

  • (Scope)

    only those instances with tags that use the kewyord



39
40
41
# File 'app/models/concerns/shared/taggable.rb', line 39

def tagged_with_keyword(keyword)
  joins(:tags).where(tags: {keyword: keyword})
end