lib/heavylog.rb in heavylog-0.0.12 vs lib/heavylog.rb in heavylog-0.0.13
- old
+ new
@@ -61,10 +61,10 @@
def setup_custom_payload
return unless config.custom_payload_method.respond_to?(:call)
klasses = Array(config.base_controller_class)
klasses.map! { |klass| klass.try(:constantize) }
- klasses.push(ActionController::Base) if klasses.empty?
+ klasses.push(ActionController::Base, ActionController::API) if klasses.empty?
klasses.each { |klass| extend_base_controller_class(klass) }
end
def extend_base_controller_class(klass)
append_payload_method = klass.instance_method(:append_info_to_payload)