mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-11-17 22:51:24 +08:00
16 lines
314 B
Ruby
16 lines
314 B
Ruby
# frozen_string_literal: true
|
|
|
|
module Api
|
|
module V1
|
|
class TableSerializer < ActiveModel::Serializer
|
|
type :tables
|
|
attributes :id, :name, :contents, :metadata
|
|
|
|
include TimestampableModel
|
|
|
|
def contents
|
|
object.contents&.force_encoding(Encoding::UTF_8)
|
|
end
|
|
end
|
|
end
|
|
end
|