Class: Course::Admin::NotificationSettingsController

Inherits:
Controller
  • Object
show all
Defined in:
app/controllers/course/admin/notification_settings_controller.rb

Instance Method Summary collapse

Instance Method Details

#editObject


6
7
8
# File 'app/controllers/course/admin/notification_settings_controller.rb', line 6

def edit
  @page_data = @settings.email_settings.to_json
end

#updateObject


10
11
12
13
14
15
16
# File 'app/controllers/course/admin/notification_settings_controller.rb', line 10

def update
  if @settings.update(notification_settings_params) && current_course.save
    render json: @settings.email_settings
  else
    head :bad_request
  end
end