Class: Gaku::Api::V1::ContactsController
- Inherits:
-
BaseController
- Object
- ActionController::API
- ApplicationController
- BaseController
- Gaku::Api::V1::ContactsController
- Defined in:
- app/controllers/gaku/api/v1/contacts_controller.rb
Instance Attribute Summary
Attributes inherited from BaseController
Instance Method Summary collapse
Instance Method Details
#create ⇒ Object
14 15 16 17 |
# File 'app/controllers/gaku/api/v1/contacts_controller.rb', line 14 def create @contact = @contactable.contacts.create(contact_params) member_respond_to @contact end |
#index ⇒ Object
9 10 11 12 |
# File 'app/controllers/gaku/api/v1/contacts_controller.rb', line 9 def index @contacts = @contactable.contacts.all collection_respond_to @contacts, root: :contacts end |