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

Fix ActiveRecord::Relation#cache_key for relations with no results #23081

Merged

Conversation

prathamesh-sonpatki
Copy link
Member

  • When relations return no result or 0 result then cache_key should
    handle it gracefully instead of blowing up trying to access
    result[:size] and result[:timestamp].
  • Fixes Rails 5 + collection cache #23063.

r? @matthewd

- When relations return no result or 0 result then cache_key should
  handle it gracefully instead of blowing up trying to access
  `result[:size]` and `result[:timestamp]`.
- Fixes rails#23063.
@prathamesh-sonpatki prathamesh-sonpatki force-pushed the fix-cache-key-for-queries-with-offset branch from 44893b8 to 66023ec Compare January 22, 2016 05:49
@prathamesh-sonpatki
Copy link
Member Author

Rebased with master.

kaspth added a commit that referenced this pull request Jan 24, 2016
…queries-with-offset

Fix ActiveRecord::Relation#cache_key for relations with no results
@kaspth kaspth merged commit 8c1f248 into rails:master Jan 24, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants