Sha256: ff09de846d85f43d0ff8ade9b8e597a99aec584d686b5e0b0ae2652b2c873392

Contents?: true

Size: 390 Bytes

Versions: 1

Compression:

Stored size: 390 Bytes

Contents

# frozen_string_literal: true

module AdequateJson
  module Serializer
    include AdequateJson::Resolver

    def render_json(model, variant: nil, **options)
      render json: choose_serializer(model, variant: variant), **options
    end

    def render_error(error, model = nil, includes: nil, **options)
      render json: Error.for(error, model, includes), **options
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
adequate_json-0.1.0 lib/adequate_json/serializer.rb