Class: Annex::BlocksController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- ApplicationController
- Annex::BlocksController
- Defined in:
- app/controllers/annex/blocks_controller.rb
Instance Method Summary collapse
-
#create ⇒ Object
POST /annex/blocks.
Methods inherited from ApplicationController
#annex_authenticate!, #annex_authorize!
Instance Method Details
#create ⇒ Object
POST /annex/blocks
7 8 9 10 11 12 13 14 15 |
# File 'app/controllers/annex/blocks_controller.rb', line 7 def create @block = Block.builder(params) if @block.save render json: { status: :success }, status: :ok else render json: @block.errors, status: :unprocessable_entity end end |