Class: Gaku::Admin::SpecialtiesController

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

Instance Method Summary collapse

Instance Method Details

#createObject



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

def create
  @specialty = Specialty.new(specialty_params)
  @specialty.save
  @count = Specialty.count
  respond_with @specialty
end

#destroyObject



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

def destroy
  @specialty.destroy
  @count = Specialty.count
  respond_with @specialty
end

#editObject



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

def edit
end

#indexObject



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

def index
  @specialties = Specialty.all
  @count = Specialty.count
  respond_with @specialtys
end

#newObject



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

def new
  @specialty = Specialty.new
  respond_with @specialty
end

#updateObject



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

def update
  @specialty.update(specialty_params)
  respond_with @specialty
end