]> git.openstreetmap.org Git - rails.git/commit
Ensure that short duration blockss are shown as '0 hours'
authorAndy Allan <git@gravitystorm.co.uk>
Wed, 9 Jun 2021 13:17:56 +0000 (14:17 +0100)
committerAndy Allan <git@gravitystorm.co.uk>
Wed, 9 Jun 2021 13:17:56 +0000 (14:17 +0100)
commit5ce14cfa4d7792346e96a3895df73e3510c936ea
tree55d0e91f927cd7dc1e1db6ff083a1a290278940b
parentbaa32464cda54d41c3f5b24a1ddb37fea0fd4917
Ensure that short duration blockss are shown as '0 hours'

Passing `:count => nil` means that i18n.t will return the hash of translations, so use a default value of 0 when checking for hours to prevent this.

Refs #3210
app/helpers/user_blocks_helper.rb
test/helpers/user_blocks_helper_test.rb