Module: Shared::Tags::ClassMethods

Defined in:
app/models/concerns/shared/tags.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



54
55
56
# File 'app/models/concerns/shared/tags.rb', line 54

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