Reputation: 6353
I'm trying to render how the specific attributes but all attributes are getting returned, it seems like AMS isn't having any effect.
Serializer:
class ImagesSerializer < ActiveModel::Serializer
attributes :id, :facility_id, :title, :description
end
Upvotes: 1
Views: 53
Reputation: 7482
Your serializer should be called ImageSerializer
(note absence of s
), because your model is named Image
.
And make sure the file is put under app/serializers/image_serializer.rb
.
Upvotes: 2