Class: Workarea::Admin::EmailSignupsController

Inherits:
ApplicationController show all
Defined in:
app/controllers/workarea/admin/email_signups_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

#destroyObject



11
12
13
14
15
16
17
# File 'app/controllers/workarea/admin/email_signups_controller.rb', line 11

def destroy
   = Email::Signup.find(params[:id])
  .destroy

  flash[:success] = t('workarea.admin.email_signups.flash_messages.destroyed')
  redirect_to email_signups_path
end

#indexObject



4
5
6
7
8
9
# File 'app/controllers/workarea/admin/email_signups_controller.rb', line 4

def index
  @email_signups = Email::Signup
                    .all
                    .order_by(created_at: :desc)
                    .page(params[:page])
end