Sha256: 0dc4ec4c9c648977b6b1c2ae5e85d4146ed1bc33092c3c13af9d7e89e3bfe288

Contents?: true

Size: 645 Bytes

Versions: 2

Compression:

Stored size: 645 Bytes

Contents

class Cohortly::ReportsController < Cohortly::CohortlyController
  def index
    Cohortly::Metric.send :attr_accessor, :groups
    @metric_search = Cohortly::Metric.new(params[:cohortly_metric])
    tags = @metric_search.tags.any? ? @metric_search.tags : nil
    groups = @metric_search.groups    
    @report_name =  Cohortly::Metric.report_table_name(tags, groups, true)
    # run this in background would be better
    Cohortly::Metric.weekly_cohort_chart_for_tag(tags, groups)
    @report = Cohortly::Report.new( tags, groups, true )
    respond_to do |format|
      format.html
      format.js { render :json => @report }
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
cohortly-0.0.7 app/controllers/cohortly/reports_controller.rb
cohortly-0.0.6 app/controllers/cohortly/reports_controller.rb