Use longer lines instead of conditional variables (CodeClimate)
This commit is contained in:
@@ -118,13 +118,9 @@ class PostQueryBuilder
|
|||||||
|
|
||||||
def metatags_match(metatags, relation)
|
def metatags_match(metatags, relation)
|
||||||
metatags.each do |metatag|
|
metatags.each do |metatag|
|
||||||
metatag_name = if metatag.negated && metatags_without_ord.key?(metatag.name)
|
metatag_name = metatags_without_ord[metatag.name] if metatag.negated && metatags_without_ord.key?(metatag.name)
|
||||||
metatags_without_ord[metatag.name]
|
|
||||||
else
|
|
||||||
metatag.name
|
|
||||||
end
|
|
||||||
|
|
||||||
clause = metatag_matches(metatag_name, metatag.value, quoted: metatag.quoted)
|
clause = metatag_matches(metatag_name || metatag.name, metatag.value, quoted: metatag.quoted)
|
||||||
clause = clause.negate_relation if metatag.negated
|
clause = clause.negate_relation if metatag.negated
|
||||||
relation = relation.and_relation(clause)
|
relation = relation.and_relation(clause)
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user