Module: Graphiti::Rails::Debugging

Defined in:
lib/graphiti/rails/debugging.rb

Overview

Wraps controller actions in a [Graphiti Debugger](www.graphiti.dev/guides/concepts/debugging#debugger).

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(klass) ⇒ Object



5
6
7
# File 'lib/graphiti/rails/debugging.rb', line 5

def self.included(klass)
  klass.around_action :debug_graphiti
end

Instance Method Details

#debug_graphitiObject

Called by [‘#around_action`](api.rubyonrails.org/classes/AbstractController/Callbacks/ClassMethods.html#method-i-around_action) to wrap the current action in a Graphiti Debugger.



11
12
13
14
15
# File 'lib/graphiti/rails/debugging.rb', line 11

def debug_graphiti
  Debugger.debug do
    yield
  end
end