scinote-web/app/serializers/repository_cell_serializer.rb

19 lines
354 B
Ruby

# frozen_string_literal: true
class RepositoryCellSerializer < ActiveModel::Serializer
include Rails.application.routes.url_helpers
attributes :id, :value, :changes, :repository_column_id, :formatted_value
def changes
object.value.changes
end
def value
object.value
end
def formatted_value
object.value.formatted
end
end