diff options
Diffstat (limited to 'app/controllers/serializers')
-rw-r--r-- | app/controllers/serializers/base_serializer.rb | 8 | ||||
-rw-r--r-- | app/controllers/serializers/user_account_serializer.rb | 8 |
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 |