I have the following logic, if true I'm rendering a partial.
@taxon.tag.present? && @taxon.tag.include?('shirts') || @taxon.tag.present? && @taxon.tag.include?('dibs')
I'm trying have the following behaviour: if taxon.tag is present and includes shirts or dibs
render my partial.
I don't like that I'm repeating code so much.
I tried @taxon.tag.present? && %w(shirts dibs)include?(@taxon.canonical_tag)
didn't work because tag for shirts is: "shirts/url/url" it would work if it was "shirts"
what would be a quick way to refactor this?