Home>

I'm making a function that displays the time when the user presses the button, but the view format is
When I want to change it, you can create time_formats.rb in initializers and write the format, or use strftime, but if you haven't registered the time anyway, you will get an argument error.

For now, it's better to display if the data is available, but it's better than the if statement, but it feels bad.

Are there other ways?