Class: Services::AdtsController
- Inherits:
-
ApplicationController
- Object
- ActionController::Base
- ApplicationController
- Services::AdtsController
- Defined in:
- app/controllers/services/adts_controller.rb
Constant Summary
Constants inherited from ApplicationController
Services::ApplicationController::MAX_LIST_LENGTH
Instance Method Summary collapse
Instance Method Details
#create ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 |
# File 'app/controllers/services/adts_controller.rb', line 8 def create request.body.rewind # Need this to deal with Rails 4 bug. msg = AcceptHl7MessageContext.call(params[:messageType], request.body.read) if msg.valid? render json: { status: 'success' }, status: 200 else render json: { status: 'error', errors: msg.errors. }, status: 400 end end |