I am in this situation,
in my controller I call:
render json: @customers_filtered, serializer: User::CustomerSerializer
class User::CustomerSerializer < ActiveModel::Serializer
But when I call the controller's action, it gives me:
Unable to autoload constant CustomerSerializer, expected /var/www/qbvault/app/serializers/customer_serializer.rb to define it
If I cut the
User:: from the serializer, it doesn't find the model where to read attributes from.
Is there a way to fix di behaviour? Can I set the model name on the serializer?