Sha256: cf15fb85ae5f2ef7d0e229cf87fa7f8820313cb9c20541aeffa5c360d7a0aea9

Contents?: true

Size: 339 Bytes

Versions: 23

Compression:

Stored size: 339 Bytes

Contents

require 'fun_with_json_api/exception_serializer'

module FunWithJsonApi
  module ControllerMethods
    def render_fun_with_json_api_exception(exception)
      render json_api: exception,
             serializer: FunWithJsonApi::ExceptionSerializer,
             adapter: :json,
             status: exception.http_status
    end
  end
end

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
fun_with_json_api-0.0.5 lib/fun_with_json_api/controller_methods.rb
fun_with_json_api-0.0.4 lib/fun_with_json_api/controller_methods.rb
fun_with_json_api-0.0.3 lib/fun_with_json_api/controller_methods.rb