From 753bf8499ba5d8815db8d08a1dcf69caa20660cf Mon Sep 17 00:00:00 2001 From: HombreLaser Date: Sat, 1 Apr 2023 12:00:33 -0600 Subject: Mejora estructura del proyecto --- app/serializers/company_serializer.rb | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 app/serializers/company_serializer.rb (limited to 'app/serializers/company_serializer.rb') diff --git a/app/serializers/company_serializer.rb b/app/serializers/company_serializer.rb new file mode 100644 index 0000000..1c754ee --- /dev/null +++ b/app/serializers/company_serializer.rb @@ -0,0 +1,12 @@ +# frozen_string_literal: true + +# CompanySerializer +class CompanySerializer < BaseSerializer + extend ActionView::RoutingUrlFor + + attributes :id, :name, :country, :short_name + + attribute :logo do |object| + object.logo.url + end +end -- cgit v1.2.3