Class: IshManager::EmailMessagesController
Instance Method Summary
collapse
#basic_auth, #home, #tinymce
Instance Method Details
#create ⇒ Object
with object_key, invoking EIJ
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
# File 'app/controllers/ish_manager/email_messages_controller.rb', line 5
def create
authorize! :create, Office::EmailMessage
object_key = params[:msg][:object_key]
MsgStub.where({ object_key: object_key }).delete
stub = MsgStub.create({ object_key: object_key })
if !stub.persisted?
flash_alert "Stub could not be persisted: #{stub.errors.full_messages.join(', ')} ."
redirect_to request.referrer
return
end
Rails.env.production? ? EIJ.perform_later( stub.id.to_s ) : EIJ.perform_now( stub.id.to_s )
flash_notice "Re-inited proc'ing object_key #{object_key} ."
redirect_to request.referrer
end
|
#index ⇒ Object
24
25
26
27
28
|
# File 'app/controllers/ish_manager/email_messages_controller.rb', line 24
def index
authorize! :email_messages_index, IshManager::Ability
redirect_to controller: :email_conversations, action: :index
end
|
#show ⇒ Object
30
31
32
33
|
# File 'app/controllers/ish_manager/email_messages_controller.rb', line 30
def show
authorize! :email_messages_show, IshManager::Ability
@email_message = Office::EmailMessage.find params[:id]
end
|
#show_iframe ⇒ Object
35
36
37
38
39
|
# File 'app/controllers/ish_manager/email_messages_controller.rb', line 35
def show_iframe
authorize! :email_messages_show, IshManager::Ability
@email_message = Office::EmailMessage.find params[:id]
render layout: 'ish_manager/email_iframe'
end
|
#show_source ⇒ Object
41
42
43
44
45
|
# File 'app/controllers/ish_manager/email_messages_controller.rb', line 41
def show_source
authorize! :email_messages_show, IshManager::Ability
@email_message = Office::EmailMessage.find params[:id]
render layout: false
end
|
#show_stripped ⇒ Object
47
48
49
50
51
|
# File 'app/controllers/ish_manager/email_messages_controller.rb', line 47
def show_stripped
authorize! :email_messages_show, IshManager::Ability
@email_message = Office::EmailMessage.find params[:id]
render layout: false
end
|