Class: ConvenientService::Service::Plugins::HasJSendResultParamsValidations::UsingActiveModelValidations::Middleware
- Inherits:
-
MethodChainMiddleware
- Object
- ConvenientService::Service::Plugins::HasJSendResultParamsValidations::UsingActiveModelValidations::Middleware
- Defined in:
- lib/convenient_service/service/plugins/has_j_send_result_params_validations/using_active_model_validations/middleware.rb
Instance Method Summary collapse
Instance Method Details
#next ⇒ ConvenientService::Service::Plugins::HasJSendResult::Entities::Result
14 15 16 17 18 |
# File 'lib/convenient_service/service/plugins/has_j_send_result_params_validations/using_active_model_validations/middleware.rb', line 14 def next(...) return entity.public_send(status, data: errors, message: errors.first.to_a.map(&:to_s).join(" ")) if errors.any? chain.next(...) end |