このコミットが含まれているのは:
2026-10-26 21:53:09 +09:00
コミット 1154babe45
22個のファイルの変更、537行の追加、145行の削除
+3 -3
ファイルの表示
@@ -6,7 +6,6 @@ class CountsExportProjection
'is_latest' => 'is_latest', 'thumbnail' => 'thumbnail_url',
'thumbnail_base' => 'thumbnail_base', 'title' => 'title', 'url' => 'url',
'tags' => 'tags', 'parents' => 'parents', 'video_ms' => 'video_ms',
'original_created_at' => 'original_created_at',
'original_created_from' => 'original_created_from',
'original_created_before' => 'original_created_before',
'user' => 'created_by_user', 'created_at' => 'created_at',
@@ -43,6 +42,9 @@ class CountsExportProjection
attr_reader :columns, :headers
def initialize(params, resource:, summary:, tags:)
if params.key?('definition')
params = CountsDefaults.for(params.merge('resource' => resource)).merge(params)
end
@params = params
@labels = JSON.parse(params.fetch('labels', '{}'))
raise ArgumentError unless @labels.is_a?(Hash) && @labels.length <= 100
@@ -103,8 +105,6 @@ class CountsExportProjection
else
value = case key
when 'thumbnail' then row[:thumbnail_base]
when 'original_created_at'
{ from: row[:original_created_from], before: row[:original_created_before] }
else row[ROOT_KEYS.fetch(key).to_sym]
end
value = nested(value || [], CHILDREN.fetch(key), key) if CHILDREN.key?(key)