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

Ensure Time.zone.today is evaluated at comparison time #170

Merged

Conversation

chrislo
Copy link
Member

@chrislo chrislo commented Feb 13, 2024

Before this commit I think Time.zone.today was only being evaluated when the application first booted, rather than each time the validation was called. This manifested as validation error messages for some users when the application hadn't been deployed for several days (e.g. #169).

I'm hopeful that passing a lambda to less_than_or_equal_to will fix this but I'm unsure of how to express that in a test.

Fixes: #169

Before this commit I think `Time.zone.today` was only being evaluated
when the application first booted, rather than each time the
validation was called. This manifested as validation error messages
for some users when the application hadn't been deployed for several
days (e.g. #169).

I'm hopeful that passing a lambda to `less_than_or_equal_to` will fix
this but I'm unsure of how to express that in a test.
@chrislo chrislo merged commit a282415 into main Feb 14, 2024
2 checks passed
@chrislo chrislo deleted the wrap-time-zone-today-in-lambda-in-released-on-validation branch February 14, 2024 06:34
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

Successfully merging this pull request may close these issues.

Problem setting date of album release
2 participants