Fix various rubocop issues.

This commit is contained in:
evazion
2020-01-11 19:01:40 -06:00
parent bab656a873
commit aff3d3b18f
15 changed files with 24 additions and 32 deletions

View File

@@ -636,7 +636,7 @@ class Post < ApplicationRecord
def normalize_tags
normalized_tags = Tag.scan_tags(tag_string)
normalized_tags = apply_casesensitive_metatags(normalized_tags)
normalized_tags = normalized_tags.map {|tag| tag.downcase}
normalized_tags = normalized_tags.map(&:downcase)
normalized_tags = filter_metatags(normalized_tags)
normalized_tags = remove_negated_tags(normalized_tags)
normalized_tags = TagAlias.to_aliased(normalized_tags)
@@ -1256,7 +1256,7 @@ class Post < ApplicationRecord
def children_ids
if has_children?
children.map {|p| p.id}.join(' ')
children.map(&:id).join(' ')
end
end
end
@@ -1335,7 +1335,7 @@ class Post < ApplicationRecord
self.is_deleted = false
self.approver_id = CurrentUser.id
flags.each {|x| x.resolve!}
flags.each(&:resolve!)
save
ModAction.log("undeleted post ##{id}", :post_undelete)
end