summaryrefslogtreecommitdiff
path: root/app/controllers
diff options
context:
space:
mode:
authorHombreLaser <sebastian-440@live.com>2023-02-24 23:25:43 -0600
committerHombreLaser <sebastian-440@live.com>2023-02-24 23:25:43 -0600
commit47ea55216514f532c8e30618f621aeb93bd19eb0 (patch)
treee24901a5271f465a337623eaad456b4ae88d91dc /app/controllers
parente1a240c563b0e10e0ceae7c167fdcde752f3d865 (diff)
Mueve de directorio los serializadores
Diffstat (limited to 'app/controllers')
-rw-r--r--app/controllers/serializers/base_serializer.rb8
-rw-r--r--app/controllers/serializers/user_account_serializer.rb8
2 files changed, 16 insertions, 0 deletions
diff --git a/app/controllers/serializers/base_serializer.rb b/app/controllers/serializers/base_serializer.rb
new file mode 100644
index 0000000..bead772
--- /dev/null
+++ b/app/controllers/serializers/base_serializer.rb
@@ -0,0 +1,8 @@
+# frozen_string_literal: true
+
+module Serializers
+ # The father class of all serializers.
+ class BaseSerializer
+ include JSONAPI::Serializer
+ end
+end
diff --git a/app/controllers/serializers/user_account_serializer.rb b/app/controllers/serializers/user_account_serializer.rb
new file mode 100644
index 0000000..09379c4
--- /dev/null
+++ b/app/controllers/serializers/user_account_serializer.rb
@@ -0,0 +1,8 @@
+# frozen_string_literal: true
+
+module Serializers
+ # The serializer for the user account model.
+ class UserAccountSerializer < BaseSerializer
+ attributes :email, :first_name, :last_name, :role
+ end
+end