Fix various rubocop issues.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user