Sha256: e040741a7f0af13724fbf0a30b65c5384ff26520c8eae4640eb4ae90dd6b3c63
Contents?: true
Size: 589 Bytes
Versions: 16
Compression:
Stored size: 589 Bytes
Contents
<%- unless omit_comments? -%> # Serializers define the rendered JSON for a model instance. # We use jsonapi-rb, which is similar to active_model_serializers. <%- end -%> <% module_namespacing do -%> class Serializable<%= class_name %> < JSONAPI::Serializable::Resource type :<%= type %> <%- unless omit_comments? -%> # Add attributes here to ensure they get rendered, .e.g. # # attribute :name # # To customize, pass a block and reference the underlying @object # being serialized: # # attribute :name do # @object.name.upcase # end <%- end -%> end <% end -%>
Version data entries
16 entries across 16 versions & 1 rubygems