app/controllers/cohortly/reports_controller.rb in cohortly-0.0.1 vs app/controllers/cohortly/reports_controller.rb in cohortly-0.0.2

- old
+ new

@@ -1,8 +1,9 @@ class Cohortly::ReportsController < Cohortly::CohortlyController def index @metric_search = Cohortly::Metric.new(params[:cohortly_metric]) - Cohortly::Metric.cohort_chart_for_tag(params[:tags]) - @report = Cohortly::Report.new( Cohortly::Metric.report_table_name(params[:tags]) ) + tags = @metric_search.tags.any? ? @metric_search.tags : nil + Cohortly::Metric.cohort_chart_for_tag(tags) + @report = Cohortly::Report.new( Cohortly::Metric.report_table_name(tags) ) end end