-
Notifications
You must be signed in to change notification settings - Fork 81
Open
Description
Expected behavior
When overriding a route, I can't edit the success notification:
Actual behavior
Here is my code:
# lib/forest_liana/controllers/organizations_controller.rb
if ForestLiana::UserSpace.const_defined?("OrganizationController")
ForestLiana::UserSpace::OrganizationController.class_eval do
def destroy
organization_id = params[:id]
Organizations::DestroyWorker.perform_async(organization_id)
render status: 200, json: { success: "The organization #{organization_id} will be deleted soon!" }
end
endI always get "Organization deleted!" as notification
I've tried several way to render a success messages but non of them worked
render status: 200, plain: success_message
render status: 201, html: success_message
In smart actions it says : render json: { success: success_message }
Thanks for you help !
forest_liana (7.6.7)
Metadata
Metadata
Assignees
Labels
No labels