mirror of
https://github.com/ditkrg/schemable.git
synced 2026-01-22 22:26:41 +00:00
Moves example to readme documentations
This commit is contained in:
parent
7fb82b33ff
commit
9abdfe2a77
@ -29,21 +29,6 @@ module Swagger
|
|||||||
def excluded_update_request_attributes
|
def excluded_update_request_attributes
|
||||||
%i[updated_at created_at]
|
%i[updated_at created_at]
|
||||||
end
|
end
|
||||||
|
|
||||||
# Methods that maybe useful if factory_bot and jsonapi-rails are used to generate the instance
|
|
||||||
##################################################
|
|
||||||
# include SerializersHelper # This is a helper module that contains a method "serializers_map" that maps models to serializers
|
|
||||||
#
|
|
||||||
# attr_accessor :instance
|
|
||||||
#
|
|
||||||
# def serialized_instance
|
|
||||||
# @instance ||= JSONAPI::Serializable::Renderer.new.render(FactoryBot.create(:#{@model_name.underscore.downcase.singularize}), class: serializers_map, include: [])
|
|
||||||
# end
|
|
||||||
#
|
|
||||||
# def serializer
|
|
||||||
# V1::#{@model_name.classify}Serializer
|
|
||||||
# end
|
|
||||||
##################################################
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user