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

Fixes time_range for quarter/last combination #151

merged 1 commit into from Oct 26, 2016


2 participants

leonelgalan commented Oct 25, 2016

time_range was nil when grouping by quarter causing the WHERE clause to be, for example:

AND (created_at IS NOT NULL)
Fixes time_range for quarter/last combination
`time_range` was nil when grouping by quarter.

@ankane ankane merged commit 5479431 into ankane:master Oct 26, 2016

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed

This comment has been minimized.


ankane commented Oct 26, 2016

Awesome, thanks @leonelgalan! Complete with tests 💯 Going to make one small change to loop over steps rather than multiply due to this behavior.

today =
# 2016-10-25 00:00:00 -0700
today - 12.months
# 2015-10-25 00:00:00 -0700
today - 12 * 1.month
# 2015-10-31 00:00:00 -0700

This comment has been minimized.


leonelgalan commented Oct 26, 2016

Sure thing, thanks for for pointing it out. I learned something new today.

ankane added a commit that referenced this pull request Oct 26, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment