-
Notifications
You must be signed in to change notification settings - Fork 643
Recently updated sort #1264
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
Recently updated sort #1264
Conversation
56a565d
to
c0bcbf7
Compare
Will take care of it when I'm back from RailsConf |
Is there a reason we needed to introduce the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should be able to do all the time calculations in the database using Diesel, shouldn't need to involve time
, chrono
, or any Duration
s. Other than that this just needs a rebase.
src/tests/krate.rs
Outdated
// Set the updated at column for each crate | ||
let updated = Utc::now().naive_utc(); | ||
update(&krate1) | ||
.set(crates::updated_at.eq(updated - Duration::weeks(3))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't need to do this in Rust. This can just be now - 3.weeks()
(use diesel::dsl::*
)
4130b9e
to
cb6c362
Compare
I did a rebase and a force-push to avoid having to merge and then revert the Cargo.toml changes 😅 Sorry for letting this sit so long! |
bors: r+ |
1264: Recently updated sort r=carols10cents a=moore3071 Allow sorting by which crates were most recently updated as mentioned in #1210. The option is called 'recent-updates' in order to match the naming convention of 'recent-downloads' Co-authored-by: Brandon Moore <[email protected]> Co-authored-by: Carol (Nichols || Goulding) <[email protected]>
Build succeeded |
Allow sorting by which crates were most recently updated as mentioned in #1210. The option is called 'recent-updates' in order to match the naming convention of 'recent-downloads'