Class: AlchemyCrm::Admin::MailingsController
- Inherits:
-
BaseController
- Object
- Alchemy::Admin::ResourcesController
- BaseController
- AlchemyCrm::Admin::MailingsController
show all
- Defined in:
- app/controllers/alchemy_crm/admin/mailings_controller.rb
Instance Method Summary
collapse
#alchemy_crm_t, #i18n_t, included, #translate_model_attribute
Instance Method Details
#copy ⇒ Object
11
12
13
14
|
# File 'app/controllers/alchemy_crm/admin/mailings_controller.rb', line 11
def copy
@mailing = Mailing.copy(params[:id])
render :action => :new, :layout => false
end
|
#edit_content ⇒ Object
25
26
27
28
|
# File 'app/controllers/alchemy_crm/admin/mailings_controller.rb', line 25
def edit_content
@mailing = Mailing.find(params[:id])
@page = @mailing.page
end
|
#show ⇒ Object
16
17
18
19
20
21
22
23
|
# File 'app/controllers/alchemy_crm/admin/mailings_controller.rb', line 16
def show
@mailing = Mailing.find(params[:id])
@page = @mailing.page
@contact = Contact.fake
@recipient = Recipient.new_from_contact(@contact)
@preview_mode = true
render :layout => 'alchemy_crm/mailings'
end
|
#update ⇒ Object
30
31
32
33
34
35
36
37
|
# File 'app/controllers/alchemy_crm/admin/mailings_controller.rb', line 30
def update
@mailing.update_attributes(params[:mailing], :as => current_user.role.to_sym)
render_errors_or_redirect(
@mailing,
:back,
flash_notice_for_resource_action
)
end
|