Class: Gaku::Admin::ContactTypesController

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

Instance Method Summary collapse

Instance Method Details

#createObject



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

def create
  @contact_type = ContactType.new(contact_type_params)
  @contact_type.save
  @count = ContactType.count
  respond_with @contact_type
end

#destroyObject



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

def destroy
  @contact_type.destroy
  @count = ContactType.count
  respond_with @contact_type
end

#editObject



29
30
# File 'app/controllers/gaku/admin/contact_types_controller.rb', line 29

def edit
end

#indexObject



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

def index
  @contact_types = ContactType.all
  @count = ContactType.count
  respond_with @contact_types
end

#newObject



17
18
19
20
# File 'app/controllers/gaku/admin/contact_types_controller.rb', line 17

def new
  @contact_type = ContactType.new
  respond_with @contact_type
end

#updateObject



32
33
34
35
# File 'app/controllers/gaku/admin/contact_types_controller.rb', line 32

def update
  @contact_type.update(contact_type_params)
  respond_with @contact_type
end