Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
vanboom opened this issue Mar 2, 2020 · 0 comments
Open

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

vanboom opened this issue Mar 2, 2020 · 0 comments

Comments

@vanboom
Copy link

vanboom commented Mar 2, 2020

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant