Sha256: 56111f1a304f5f3a54172fa2069a9fb239572698c584d52e5e501e2f88f01305

Contents?: true

Size: 479 Bytes

Versions: 2

Compression:

Stored size: 479 Bytes

Contents

class Cohortly::ReportsController < Cohortly::CohortlyController
  def index
    @metric_search = Cohortly::Metric.new(params[:cohortly_metric])
    tags = @metric_search.tags.any? ? @metric_search.tags : nil
    report_name =  Cohortly::Metric.report_table_name(tags)
    unless Cohortly::Metric.database.collections.collect(&:name).include?( report_name )
      Cohortly::Metric.cohort_chart_for_tag(tags)
    end  
    @report = Cohortly::Report.new( report_name )
  end

end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
cohortly-0.0.5 app/controllers/cohortly/reports_controller.rb
cohortly-0.0.4 app/controllers/cohortly/reports_controller.rb