Class: Gaku::Admin::AttendanceTypesController

Inherits:
BaseController
  • Object
show all
Defined in:
app/controllers/gaku/admin/attendance_types_controller.rb

Instance Method Summary collapse

Instance Method Details

#createObject



20
21
22
23
24
25
# File 'app/controllers/gaku/admin/attendance_types_controller.rb', line 20

def create
  @attendance_type = AttendanceType.new(attendance_type_params)
  @attendance_type.save
  set_count
  respond_with @attendance_type
end

#destroyObject



35
36
37
38
39
# File 'app/controllers/gaku/admin/attendance_types_controller.rb', line 35

def destroy
  @attendance_type.destroy
  set_count
  respond_with @attendance_type
end

#editObject



27
28
# File 'app/controllers/gaku/admin/attendance_types_controller.rb', line 27

def edit
end

#indexObject



9
10
11
12
13
# File 'app/controllers/gaku/admin/attendance_types_controller.rb', line 9

def index
  @attendance_types = AttendanceType.all
  set_count
  respond_with @attendance_types
end

#newObject



15
16
17
18
# File 'app/controllers/gaku/admin/attendance_types_controller.rb', line 15

def new
  @attendance_type = AttendanceType.new
  respond_with @attendance_type
end

#updateObject



30
31
32
33
# File 'app/controllers/gaku/admin/attendance_types_controller.rb', line 30

def update
  @attendance_type.update(attendance_type_params)
  respond_with @attendance_type
end