]> git.openstreetmap.org Git - rails.git/commit
Add deactivates_at date to user blocks
authorAnton Khorev <tony29@yandex.ru>
Tue, 13 Aug 2024 10:57:31 +0000 (13:57 +0300)
committerAnton Khorev <tony29@yandex.ru>
Mon, 19 Aug 2024 11:33:20 +0000 (14:33 +0300)
commitcff4c63713e794672532b10d614e4be01a1f4e48
tree5dd8c2c8ec5f5382506f24e3d3246a797bf53f13
parent41b81bd393cafe8fb0d25ccdc3afb08fb695bb52
Add deactivates_at date to user blocks

Block deactivation dates that take needs_view-block views into account were derived using updated_at. This was possible because inactive blocks couldn't be edited and their updated_at date wouldn't change. With editing of inactive blocks enabled deactivation date needs to be saved explicitly.
app/controllers/user_blocks_controller.rb
app/helpers/user_blocks_helper.rb
app/models/user_block.rb
db/migrate/20240813070506_add_deactivates_at_to_user_blocks.rb [new file with mode: 0644]
db/structure.sql
test/controllers/user_blocks_controller_test.rb
test/factories/user_blocks.rb
test/integration/user_blocks_test.rb