Class: MailyHerald::Webui::MailingsController

Inherits:
DispatchesController show all
Defined in:
app/controllers/maily_herald/webui/mailings_controller.rb

Instance Method Summary collapse

Methods inherited from DispatchesController

#archived, #destroy, #index, #toggle, #update_form

Methods inherited from ResourcesController

#create, #destroy, #edit, #index, #new, #show

Methods inherited from ApplicationController

#expert_mode?, #work_mode

Methods included from MailyHerald::Webui::MenuManager::ControllerExtensions

included

Methods included from Breadcrumbs::ControllerExtensions

included

Instance Method Details

#previewObject



14
15
16
17
18
19
20
21
# File 'app/controllers/maily_herald/webui/mailings_controller.rb', line 14

def preview
  find_item

  @e = @item.list.context.scope.find(params[:entity_id])
  @mail = @item.build_mail @e

  render layout: "maily_herald/webui/modal"
end

#updateObject



3
4
5
6
7
8
9
10
11
12
# File 'app/controllers/maily_herald/webui/mailings_controller.rb', line 3

def update
  super

  case edited_container
  when "details"
    render_containers ["details", "template"]
  when "template"
    render_containers "template"
  end
end