Class: Workarea::Admin::ContentEmailsController

Inherits:
ApplicationController show all
Defined in:
app/controllers/workarea/admin/content_emails_controller.rb

Instance Method Summary collapse

Methods inherited from ApplicationController

#current_user, #find_sort, #wrap_in_view_model, wrap_in_view_model

Methods included from Publishing

#allow_publishing!, #allow_publishing?, #set_publishing_options

Methods included from Visiting

#most_visited

Instance Method Details

#editObject



10
# File 'app/controllers/workarea/admin/content_emails_controller.rb', line 10

def edit; end

#indexObject



6
7
8
# File 'app/controllers/workarea/admin/content_emails_controller.rb', line 6

def index
  @emails = Content::Email.all
end

#updateObject



12
13
14
15
16
17
18
19
20
21
22
# File 'app/controllers/workarea/admin/content_emails_controller.rb', line 12

def update
  if @email.update_attributes(email_params)
    flash[:success]= t(
      'workarea.admin.content_emails.flash_messages.updated',
      type: @email.type.titleize
    )
    redirect_to content_emails_path
  else
    render :edit
  end
end