Class: Course::Admin::MaterialSettingsController

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

Instance Method Summary collapse

Instance Method Details

#editObject


5
6
# File 'app/controllers/course/admin/material_settings_controller.rb', line 5

def edit
end

#updateObject


8
9
10
11
12
13
14
# File 'app/controllers/course/admin/material_settings_controller.rb', line 8

def update
  if @settings.update(material_settings_params) && current_course.save
    redirect_to course_admin_materials_path(current_course), success: t('.success')
  else
    render 'edit'
  end
end