Class: Course::Admin::AdminController

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

Instance Method Summary collapse

Instance Method Details

#destroyObject

:nodoc:


15
16
17
18
19
20
21
# File 'app/controllers/course/admin/admin_controller.rb', line 15

def destroy #:nodoc:
  if current_course.destroy
    destroy_success
  else
    destroy_failure
  end
end

#indexObject


3
4
# File 'app/controllers/course/admin/admin_controller.rb', line 3

def index
end

#updateObject

:nodoc:


6
7
8
9
10
11
12
13
# File 'app/controllers/course/admin/admin_controller.rb', line 6

def update #:nodoc:
  if current_course.update_attributes(course_setting_params)
    redirect_to course_admin_path(current_course),
                success: t('.success', title: current_course.title)
  else
    render 'index'
  end
end