Sha256: d8c628b1f34fdb80b00bcce87864b9add2525971a727a2eea03e82ea269442d6

Contents?: true

Size: 554 Bytes

Versions: 2

Compression:

Stored size: 554 Bytes

Contents

module ReportsKit
  class ReportsController < ReportsKit::BaseController
    def index
      # RubyProf.start
      properties = ActiveSupport::JSON.decode(params[:properties])
      report_data = Reports::Data::Generate.new(properties, context_record: context_record).perform
      # result = RubyProf.stop
      # printer = RubyProf::CallStackPrinter.new(result)
      # File.open(Rails.root.join('tmp', 'out.html'), 'w') do |file|
      #   printer.print(file, :min_percent => 2)
      # end
      render json: { data: report_data }
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
reports_kit-0.0.2 lib/reports_kit/reports_controller.rb
reports_kit-0.0.1 lib/reports_kit/reports_controller.rb