Skip to content

Docs: Can't use group_by(&:purchased_at) in chart method #17

@vanboom

Description

@vanboom

In the README...

  # Define a query that works on another query's result set
  # Note: chart and data are aliases for query
  chart :deliveries_over_time, through: :deliveries do |results|
    results.group_by(&:purchased_at)
  end

The results given to the chart block is an ActiveRecord::HashWithIndifferentAccess and not an ActiveRecord result.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions