Use use_jsx_rendering_defaults and superglue_template for cleaner directories.
classPostsController<ApplicationController before_action :use_jsx_rendering_defaults superglue_template "application/superglue"#defaults to application/superglueend
!!! warning The file, partial, body, plain, html, inline will not work with render when using before_action :use_jsx_rendering_defaults callback. Make use of :only and :except to narrow down its usage.
Which will allow you to deduplicate the files:
and omit props files for cases when there is no content.
redirect_back_with_props_at
A helper to help retain the props_at parameter as part of the redirect location. This helper has the same method signature as Rails own redirect_back.
Setting the content location
You can override the URL Superglue uses to display on the address bar and store your response directly from the server using content-location. This is optional. For example: