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



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

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

#destroyObject



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

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

#editObject



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

def edit
end

#indexObject



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

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

#newObject



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

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

#updateObject



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

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