Class: Gaku::Admin::SchoolYearsController

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

Instance Method Summary collapse

Instance Method Details

#createObject



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

def create
  @school_year = SchoolYear.new(school_year_params)
  @school_year.save
  set_count
  respond_with @school_year
end

#destroyObject



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

def destroy
  @school_year.destroy
  set_count
  respond_with @school_year
end

#editObject



26
27
# File 'app/controllers/gaku/admin/school_years_controller.rb', line 26

def edit
end

#indexObject



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

def index
  @school_years = SchoolYear.all
  set_count
  respond_with @school_years
end

#newObject



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

def new
  @school_year = SchoolYear.new
end

#updateObject



29
30
31
32
# File 'app/controllers/gaku/admin/school_years_controller.rb', line 29

def update
  @school_year.update(school_year_params)
  respond_with @school_year
end