This commit is contained in:
@@ -392,7 +392,7 @@ class PostsController < ApplicationController
|
||||
tag = tags_by_id[tag_id]
|
||||
return nil unless tag
|
||||
|
||||
sections = PostTagSection.where(post_id: post.id, tag_id: tag.id)
|
||||
sections = PostTagSection.where(post_id: post.id, tag_id:)
|
||||
.as_json(only: [:begin_ms, :end_ms])
|
||||
|
||||
if path.include?(tag_id)
|
||||
@@ -419,7 +419,7 @@ class PostsController < ApplicationController
|
||||
|
||||
params[:parent_post_ids].to_s.split.map { |token|
|
||||
id = Integer(token, exception: false)
|
||||
raise ArgumentError, "親投稿 Id. が不正です: #{ token }" if id.nil? || id <= 0
|
||||
raise ArgumentError, "親投稿 Id. が不正です: #{ token }" if !(id) || id <= 0
|
||||
|
||||
id
|
||||
}.uniq
|
||||
|
||||
Reference in New Issue
Block a user