上映会のし組み作り(#295) (#296)
#295 #295 #295 #295 #295 #295 #295 Co-authored-by: miteruzo <miteruzo@naver.com> Reviewed-on: #296
This commit was merged in pull request #296.
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
|
||||
module TheatreRepr
|
||||
BASE = { only: [:id, :name, :opens_at, :closes_at, :created_at, :updated_at],
|
||||
include: { created_by_user: { only: [:id, :name] } } }.freeze
|
||||
|
||||
module_function
|
||||
|
||||
def base theatre
|
||||
theatre.as_json(BASE)
|
||||
end
|
||||
|
||||
def many theatre
|
||||
theatre.map { |t| base(t) }
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user