このコミットが含まれているのは:
@@ -137,6 +137,21 @@ class Post < ApplicationRecord
|
||||
end
|
||||
end
|
||||
|
||||
def snapshot_tags_json
|
||||
post_tags
|
||||
.kept
|
||||
.joins(tag: :tag_name)
|
||||
.includes(:sections, tag: :tag_name)
|
||||
.order('tag_names.name')
|
||||
.map do |pt|
|
||||
{ id: pt.tag.id,
|
||||
version_no: pt.tag.version_no,
|
||||
name: pt.tag.name,
|
||||
category: pt.tag.category,
|
||||
sections: pt.sections.map { { begin_ms: _1.begin_ms, end_ms: _1.end_ms } } }
|
||||
end
|
||||
end
|
||||
|
||||
def self.section_literal section
|
||||
end_ms =
|
||||
section.end_ms ? Post.ms_to_time(section.end_ms) : ''
|
||||
|
||||
新しい課題から参照
ユーザをブロックする