mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-11-15 13:45:25 +08:00
21 lines
472 B
Ruby
21 lines
472 B
Ruby
# frozen_string_literal: true
|
|
|
|
class LabelPrinterSerializer < ActiveModel::Serializer
|
|
include Rails.application.routes.url_helpers
|
|
include ApplicationHelper
|
|
|
|
attributes :name, :display_name, :description, :type_of, :language_type, :status
|
|
|
|
def urls
|
|
{
|
|
}
|
|
end
|
|
|
|
def display_name
|
|
object.description.present? ? escape_input("#{object.name} • #{object.description}") : escape_input(object.name)
|
|
end
|
|
|
|
def status
|
|
object.status.dasherize
|
|
end
|
|
end
|