diff --git a/app/controllers/maintenance/user/dmail_filters_controller.rb b/app/controllers/maintenance/user/dmail_filters_controller.rb index 50ca9cb8d..f5a0ce855 100644 --- a/app/controllers/maintenance/user/dmail_filters_controller.rb +++ b/app/controllers/maintenance/user/dmail_filters_controller.rb @@ -3,6 +3,7 @@ module Maintenance class DmailFiltersController < ApplicationController before_filter :ensure_ownership before_filter :member_only + respond_to :html, :json, :xml def edit @dmail_filter = CurrentUser.dmail_filter || DmailFilter.new @@ -12,7 +13,7 @@ module Maintenance @dmail_filter = CurrentUser.dmail_filter || DmailFilter.new @dmail_filter.update(params.require(:dmail_filter).permit(:words), :as => CurrentUser.role) flash[:notice] = "Filter updated" - redirect_to(dmail_path(@dmail.id)) + respond_with(@dmail) end private