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



23
24
25
26
27
28
# File 'app/controllers/gaku/admin/attendance_types_controller.rb', line 23

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

#destroyObject



38
39
40
41
42
# File 'app/controllers/gaku/admin/attendance_types_controller.rb', line 38

def destroy
  @attendance_type.destroy
  @count = AttendanceType.count
  respond_with @attendance_type
end

#editObject



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

def edit
end

#indexObject



12
13
14
15
16
# File 'app/controllers/gaku/admin/attendance_types_controller.rb', line 12

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

#newObject



18
19
20
21
# File 'app/controllers/gaku/admin/attendance_types_controller.rb', line 18

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

#updateObject



33
34
35
36
# File 'app/controllers/gaku/admin/attendance_types_controller.rb', line 33

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