Class: Dscf::Credit::BankStaffsController
- Inherits:
-
ApplicationController
- Object
- Dscf::Core::ApplicationController
- ApplicationController
- Dscf::Credit::BankStaffsController
- Includes:
- Dscf::Core::Common, Dscf::Core::JsonResponse
- Defined in:
- app/controllers/dscf/credit/bank_staffs_controller.rb
Instance Method Summary collapse
Instance Method Details
#create ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'app/controllers/dscf/credit/bank_staffs_controller.rb', line 6 def create service = BankStaffCreationService.new(flattened_creation_params) if service.call render_success( data: service.bank_staff, status: :created, serializer_options: { include: default_serializer_includes[:create] } ) else render_error( errors: service.errors., status: :unprocessable_entity ) end end |