Files
ubicloud/serializers/project.rb
Burak Yucesoy 69ecb12e8d Combine all serializers under top level namespace
We merged all web and api serializers. There is no need for separate namespaces
anymore.
2024-05-28 21:42:31 +03:00

19 lines
324 B
Ruby

# frozen_string_literal: true
class Serializers::Project < Serializers::Base
def self.serialize_internal(p, options = {})
base = {
id: p.ubid,
name: p.name,
credit: p.credit.to_f,
discount: p.discount
}
if options[:include_path]
base[:path] = p.path
end
base
end
end