discourse/spec/serializers
Robin Ward 7fee3c61de
Support for custom messages and redirects when creating posts (#8434)
* Support for custom messages and redirects when creating posts

When a post/topic is created Discourse serializes a `NewPostResult`
object. Normally this contains a status like `created_post` or
errors describing why the post could not be created.

There are times when a plugin might want to take the inputted post
and do something in the background. In this case, the plugin
can return a custom `message` and `route_to` attribute in the
`NewPostResult`.

If present, the message will be displayed in an alert, and when "Ok" is
clicked the user will be routed to the new URL.

* Destroy the draft in parallel
2019-11-29 09:30:54 -05:00
..
admin_plugin_serializer_spec.rb DEV: use #frozen_string_literal: true on all spec 2019-04-30 10:27:42 +10:00
admin_user_list_serializer_spec.rb DEV: Upgrading Discourse to Zeitwerk (#8098) 2019-10-02 14:01:53 +10:00
basic_group_serializer_spec.rb FIX: Keep emoji images in group bio excerpt (#8329) 2019-11-11 18:42:08 +02:00
basic_group_user_serializer_spec.rb DEV: Prefabrication (test optimization) (#7414) 2019-05-07 13:12:20 +10:00
basic_post_serializer_spec.rb DEV: Upgrading Discourse to Zeitwerk (#8098) 2019-10-02 14:01:53 +10:00
basic_user_serializer_spec.rb DEV: Upgrading Discourse to Zeitwerk (#8098) 2019-10-02 14:01:53 +10:00
category_detailed_serializer_spec.rb DEV: Upgrading Discourse to Zeitwerk (#8098) 2019-10-02 14:01:53 +10:00
category_serializer_spec.rb DEV: Upgrading Discourse to Zeitwerk (#8098) 2019-10-02 14:01:53 +10:00
category_upload_serializer_spec.rb DEV: Prefabrication (test optimization) (#7414) 2019-05-07 13:12:20 +10:00
current_user_serializer_spec.rb FIX: Ensure enforce 2FA for staff satisfied by security keys (#8316) 2019-11-08 15:11:53 +10:00
group_show_serializer_spec.rb DEV: Prefabrication (test optimization) (#7414) 2019-05-07 13:12:20 +10:00
new_post_result_serializer_spec.rb Support for custom messages and redirects when creating posts (#8434) 2019-11-29 09:30:54 -05:00
notification_serializer_spec.rb FIX: Include user id in notification webhook (#8195) 2019-10-21 16:24:41 -06:00
post_revision_serializer_spec.rb DEV: Prefabrication (test optimization) (#7414) 2019-05-07 13:12:20 +10:00
post_serializer_spec.rb DEV: Replace magic values (#8398) 2019-11-25 14:32:19 +02:00
reviewable_flagged_post_serializer_spec.rb Fix the actual failing test 2019-11-14 16:20:45 -08:00
reviewable_queued_post_serializer_spec.rb FEATURE: Allow viewing of raw emails for reviewable queued posts (#7910) 2019-07-19 11:56:14 -04:00
reviewable_serializer_spec.rb Fix the actual failing test 2019-11-14 16:20:45 -08:00
reviewable_user_serializer_spec.rb DEV: use #frozen_string_literal: true on all spec 2019-04-30 10:27:42 +10:00
single_sign_on_record_serializer_spec.rb DEV: Prefabrication (test optimization) (#7414) 2019-05-07 13:12:20 +10:00
site_serializer_spec.rb DEV: Upgrading Discourse to Zeitwerk (#8098) 2019-10-02 14:01:53 +10:00
suggested_topic_serializer_spec.rb DEV: use #frozen_string_literal: true on all spec 2019-04-30 10:27:42 +10:00
tag_group_serializer_spec.rb DEV: use #frozen_string_literal: true on all spec 2019-04-30 10:27:42 +10:00
theme_serializer_spec.rb DEV: use #frozen_string_literal: true on all spec 2019-04-30 10:27:42 +10:00
topic_link_serializer_spec.rb DEV: use #frozen_string_literal: true on all spec 2019-04-30 10:27:42 +10:00
topic_list_item_serializer_spec.rb DEV: Upgrading Discourse to Zeitwerk (#8098) 2019-10-02 14:01:53 +10:00
topic_list_serializer_spec.rb DEV: Prefabrication (test optimization) (#7414) 2019-05-07 13:12:20 +10:00
topic_view_posts_serializer_spec.rb PERF: optimize lookup of reviewable info in post stream 2019-06-07 18:12:30 +10:00
topic_view_serializer_spec.rb FEATURE: wiki editors are allowed edit tags for wiki topics. 2019-10-23 23:35:38 +05:30
upload_serializer_spec.rb DEV: Prefabrication (test optimization) (#7414) 2019-05-07 13:12:20 +10:00
user_auth_token_serializer_spec.rb DEV: Prefabrication (test optimization) (#7414) 2019-05-07 13:12:20 +10:00
user_serializer_spec.rb FIX: Ensure enforce 2FA for staff satisfied by security keys (#8316) 2019-11-08 15:11:53 +10:00
user_summary_serializer_spec.rb DEV: use #frozen_string_literal: true on all spec 2019-04-30 10:27:42 +10:00
web_hook_post_serializer_spec.rb FEATURE: Add topic and category context to post webhook payload (#8110) 2019-10-02 11:41:33 +10:00
web_hook_topic_view_serializer_spec.rb DEV: Prefabrication (test optimization) (#7414) 2019-05-07 13:12:20 +10:00
web_hook_user_serializer_spec.rb FEATURE: Site setting/UI to allow users to set their primary group (#8244) 2019-10-28 12:46:27 -05:00