Sha256: b3c7b5e9df6517ae7f2d013060b8d0a72f2a2b666397bd62c6f7dbad33f801be
Contents?: true
Size: 823 Bytes
Versions: 3
Compression:
Stored size: 823 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 if Cohortly::Metric.respond_to? :delay Cohortly::Metric.delay.weekly_cohort_chart_for_tag(tags, groups) else Cohortly::Metric.weekly_cohort_chart_for_tag(tags, groups) end @report = Cohortly::Report.new( tags, groups, true ) respond_to do |format| format.html format.js { render :json => @report } end end end
Version data entries
3 entries across 3 versions & 1 rubygems