akismet integration
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
class DmailsController < ApplicationController
|
||||
respond_to :html, :xml, :json
|
||||
before_filter :member_only, except: [:index, :show, :destroy, :mark_all_as_read]
|
||||
before_filter :gold_only, only: [:ham, :spam]
|
||||
|
||||
def new
|
||||
if params[:respond_to_id]
|
||||
@@ -55,6 +56,18 @@ class DmailsController < ApplicationController
|
||||
CurrentUser.user.save
|
||||
end
|
||||
|
||||
def spam
|
||||
@dmail = Dmail.find(params[:id])
|
||||
@dmail.update_column(:is_spam, true)
|
||||
@dmail.spam!
|
||||
end
|
||||
|
||||
def ham
|
||||
@dmail = Dmail.find(params[:id])
|
||||
@dmail.update_column(:is_spam, false)
|
||||
@dmail.ham!
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def check_privilege(dmail)
|
||||
|
||||
Reference in New Issue
Block a user