Sha256: f008adea7e38af697a7a429bb5abead9e8f67b6a259c36e72a20ac87fc5966ef

Contents?: true

Size: 544 Bytes

Versions: 5

Compression:

Stored size: 544 Bytes

Contents

module ReportsKit
  class BaseController < ActionController::Base
    include ReportsKit::NormalizedParams

    # This is intentionally public to allow external code to access it
    def context_record
      ReportsKit.configuration.context_record(self)
    end

    private

    def modify_context_params
      modify_context_params_method = ReportsKit.configuration.modify_context_params_method
      params[:context_params] = modify_context_params_method.call(params[:context_params], self) if modify_context_params_method
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
reports_kit-0.7.1 lib/reports_kit/base_controller.rb
reports_kit-0.7.0 lib/reports_kit/base_controller.rb
reports_kit-0.5.0 lib/reports_kit/base_controller.rb
reports_kit-0.4.1 lib/reports_kit/base_controller.rb
reports_kit-0.4.0 lib/reports_kit/base_controller.rb