-
Notifications
You must be signed in to change notification settings - Fork 129
Open
Description
ActiveModelSerializer allows for options to be passed to the serializer from the controller. RocketPants does not seem to support this at this time. If it does, could you please point me to instructions on how to do it?
It seems like the fix for this would be to update this line (
| instance.serializable_hash |
options variable to #serializable_hash.
SerializerWrapper = Struct.new(:serializer, :object) do
def serializable_hash(options = {})
instance = serializer.new(object, options)
if instance.respond_to?(:serializable_hash)
instance.serializable_hash
else
instance.as_json options
end
end
endI would be happy to make this change and submit a PR if that is the proper fix for this issue.
Metadata
Metadata
Assignees
Labels
No labels