docbrown/app
Jeremy Friesen 24ccc5ac06
Adding lightweight structure .coerce methods (#16249)
I saw the following error in Honeybadger:

```
[PROJECT_ROOT]/app/services/notifications/reactions/send.rb:61 :in `call`

    old_json_data = notification.json_data
    previous_siblings_size = notification.json_data["reaction"]["aggregated_siblings"].size if old_json_data

	notification.json_data = json_data
[PROJECT_ROOT]/app/services/notifications/reactions/send.rb:20 :in `call`
[PROJECT_ROOT]/app/workers/notifications/new_reaction_worker.rb:16 :in `perform`
[PROJECT_ROOT]/app/models/notification.rb:84 :in `send_reaction_notification_without_delay`
[PROJECT_ROOT]/app/controllers/reactions_controller.rb:136 :in `destroy_reaction`
[PROJECT_ROOT]/app/controllers/reactions_controller.rb:168 :in `handle_existing_reaction`
[PROJECT_ROOT]/app/controllers/reactions_controller.rb:77 :in `create`
```

As I was exploring the error, I saw that we were making assumptions
about the data coercion.  These are valid and somewhat stable
assumptions, but I wanted to look a little deeper into the situation.

This refactor helps consistently negotiate two situations where we're
transforming request-cycle models into lightweight data structures.  It
also begins to show a path towards a generalizable "macro" for this behavior.

Related to #2122, #9534
2022-01-24 11:32:19 -05:00
..
assets focus style (#16266) 2022-01-24 15:39:20 +01:00
components/admin/users Small change to make the tools section of member details mobile friendly. (#15159) 2021-10-22 18:47:20 +02:00
controllers Onboarding "improvements" (#16210) 2022-01-21 10:58:05 -06:00
decorators Patching ERB rendering of the data-info JSON (#16067) 2022-01-14 08:30:49 -05:00
errors small non-views ruby i18n (#16004) 2022-01-11 10:05:18 +07:00
forms Using a Form Object that will persist for the Creator Settings Form (#15684) 2021-12-10 17:07:40 +02:00
helpers Remove the "Getting Started" Section from the Config (#16033) 2022-01-20 07:31:35 -07:00
javascript Add new tag autocomplete to editor (#16025) 2022-01-21 08:58:05 +00:00
lib Move BlackBox to app/lib (#16183) 2022-01-20 09:37:53 +07:00
liquid_tags Implement Unified Embeds for Medium URLs (#16235) 2022-01-24 09:19:51 -05:00
mailers app/mailers i18n (#16191) 2022-01-20 07:33:29 -07:00
models Adding lightweight structure .coerce methods (#16249) 2022-01-24 11:32:19 -05:00
policies Allow for skipping navigation link creation (#16112) 2022-01-17 17:22:24 -05:00
queries small non-views ruby i18n (#16004) 2022-01-11 10:05:18 +07:00
refinements Drop profile columns from user (#10707) 2020-12-03 08:14:38 +07:00
sanitizers Extracting container for allowed tags & attrs (#15338) 2021-12-16 12:24:45 -05:00
serializers Refactoring to add helper method (#16064) 2022-01-12 11:21:44 -05:00
services Adding lightweight structure .coerce methods (#16249) 2022-01-24 11:32:19 -05:00
uploaders small non-views ruby i18n (#16004) 2022-01-11 10:05:18 +07:00
validators Remove the "Getting Started" Section from the Config (#16033) 2022-01-20 07:31:35 -07:00
view_objects Patching ERB rendering of the data-info JSON (#16067) 2022-01-14 08:30:49 -05:00
views Removed font-awesome from the admin section (#16239) 2022-01-21 08:56:22 -05:00
workers Ensuring we don't track views of author or unpublished (#16143) 2022-01-18 11:23:18 -05:00