Class: Ishapi::EmailConversationsController
Instance Method Summary
collapse
#exception, #home, #long_term_token, #vote
Instance Method Details
#delete ⇒ Object
22
23
24
25
26
27
28
29
30
31
|
# File 'app/controllers/ishapi/email_conversations_controller.rb', line 22
def delete
authorize! :email_conversations_delete, ::Ishapi
convos = Office::EmailConversation.find params[:ids]
outs = convos.map do |convo|
convo.add_tag( WpTag::TRASH )
convo.remove_tag( WpTag::INBOX )
end
flash[:notice] = "outcome: #{outs}"
render json: { status: :ok }
end
|
#rmtag ⇒ Object
12
13
14
15
16
17
18
19
20
|
# File 'app/controllers/ishapi/email_conversations_controller.rb', line 12
def rmtag
authorize! :email_conversations_rmtag, ::Ishapi
convos = Office::EmailConversation.find params[:ids]
outs = convos.map do |convo|
convo.rmtag( params[:emailtag] )
end
flash[:notice] = "outcome: #{outs}"
render json: { status: :ok }
end
|