Skip to content

Remove default_scope for reordering records#285

Open
bradleyprice wants to merge 1 commit intomasterfrom
bprice/fix-bug-with-last
Open

Remove default_scope for reordering records#285
bradleyprice wants to merge 1 commit intomasterfrom
bprice/fix-bug-with-last

Conversation

@bradleyprice
Copy link

Using a default scope to reorder records is not always the best
idea, since it's easy to introduce bugs when using .first and
.last methods.

This change fixes an issue when trying to fetch the latest ping
for a website, using .last, for the retry logic, we were actually
fetching the first ping.

Using a default scope to reorder records is not always the best
idea, since it's easy to introduce bugs when using `.first` and
`.last` methods.

This change fixes an issue when trying to fetch the latest ping
for a website, using `.last`, for the retry logic, we were actually
fetching the first ping.
@proctoru-bot
Copy link

@bradleyprice, please add a Type label.

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.

4 participants