discourse/lib/reviewable
Martin Brennan 8a89a77248
FIX: Discard empty bundles for reviewables (#30121)
Followup c7e471d35a

It is currently possible to add a bundle (which is a collection
of actions used for a dropdown on the client) for a reviewable
via actions.add_bundle and then never add any actions to it.

This causes the client to explode, as seen in the referenced
commit, because of the way our store expects to resolve objects
referenced by ID that are passed down by the serializer, which
then causes Ember to have an unrecoverable render error.

Fixing this on the serializer level is not really possible because
of all the ActiveModel::Serializer magic that serializes
objects by ID reference when doing things like has_many.
`Reviewable#actions_for` is a better place to do this anyway,
because this is the main location where the bundles and actions
are built for every action via the serializer.
2024-12-05 15:41:13 +10:00
..
actions.rb FIX: Discard empty bundles for reviewables (#30121) 2024-12-05 15:41:13 +10:00
collection.rb FIX: Don't mix up action labels between different reviewables (#23365) 2023-09-06 10:57:30 +08:00
conversation.rb
editable_fields.rb FIX: Don't mix up action labels between different reviewables (#23365) 2023-09-06 10:57:30 +08:00
perform_result.rb DEV: Apply syntax_tree formatting to `lib/*` 2023-01-09 12:10:19 +00:00