API: support PUT /maintenance/user/dmail_filter.json.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user