-
-
Notifications
You must be signed in to change notification settings - Fork 269
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
Update dates helper #828
Update dates helper #828
Conversation
@jagthedrummer I updated the tests to use Besides that, I got the Super Scaffolding tests to pass by using a fix to transformer which I temporarily added to bullet-train-co/bullet_train-core#182. I'll revert that here now that the tests are passing. The transformer fix can be found here: bullet-train-co/bullet_train-core#386 |
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.
Code LGTM
@gazayas After merging this we have one failure in CI when running against the released version of the BT gems. And I didn't realize until after I'd merged it that this branch hadn't run against both the released version and The failure is:
And what's actually there is:
Is that expected? And is it what we want? |
@jagthedrummer About the strings like
<%= render 'shared/attributes/date', attribute: :test_date %> <!-- Uses default format -->
OR
<%= render 'shared/attributes/date', attribute: :test_date, format: :short %>
OR
<%= render 'shared/attributes/date', attribute: :test_date, format: '%m/%d/%Y' %> Because of that, I was under the assumption that we would be ok with the change. What do you think is the best approach? Would be glad to look over the tests or whatever's necessary. |
@gazayas Ah, I see. I think I overlooked that particular detail in all of the convo. 🤔 Just thinking out loud, but is there a way that we could provide a default translation string that preserves the previous behavior so that we're not changing things out from under people? For instance is there a way to somehow do this? en:
time:
formats:
bt_default: "Today at #{...}" And then have the helper default to using the Or if not that, could we bring back the previous way that we calculated that string and continue to use it as the default if the dev doesn't provide a format? Or maybe a config option that can be set (which we maybe turn on by default)? It just seems very unfriendly to change the default format that people get without notice, and with no obvious/easy way to get the old defaults back. |
This reverts commit 8aa2b59.
@jagthedrummer, I saw that you opened #844, LGTM |
Continuation of #696.
Submitting as draft since I still have a little bit of work to do in the joint PR, bullet-train-co/bullet_train-core#182