Sha256: 8e004304f7444675704c4b8ca8b6229b55c24544e35d7d34d1af6fdbdd1fb27f
Contents?: true
Size: 684 Bytes
Versions: 50
Compression:
Stored size: 684 Bytes
Contents
module Graphiti # Rails Integration. Mix this in to ApplicationController. # # * Mixes in Base # * Adds a global around_action (see Base#wrap_context) # # @see Base#render_jsonapi # @see Base#wrap_context module Rails def self.included(klass) klass.class_eval do include Graphiti::Context include GraphitiErrors around_action :wrap_context around_action :debug end end def wrap_context Graphiti.with_context(jsonapi_context, action_name.to_sym) do yield end end def debug Debugger.debug do yield end end def jsonapi_context self end end end
Version data entries
50 entries across 50 versions & 1 rubygems