Class: Gaku::Api::V1::ContactTypesController

Inherits:
BaseController show all
Defined in:
app/controllers/gaku/api/v1/contact_types_controller.rb

Instance Attribute Summary

Attributes inherited from BaseController

#current_user

Instance Method Summary collapse

Instance Method Details

#createObject



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

def create
  @contact_types = ContactType.create!(contact_type_params)
  member_respond_to @contact_types
end

#indexObject



7
8
9
10
# File 'app/controllers/gaku/api/v1/contact_types_controller.rb', line 7

def index
  @contact_types = ContactType.all
  collection_respond_to @contact_types, root: :contact_types
end