app/controllers/blocky/content_blocks_controller.rb in blocky-0.0.10 vs app/controllers/blocky/content_blocks_controller.rb in blocky-0.0.11
- old
+ new
@@ -26,17 +26,21 @@
if @content_block.update(content_block_params)
respond_to do |format|
format.html {
redirect_to(content_blocks_url, notice: "Content block :#{@content_block.name} was updated successfully.")
}
- format.json
+ format.json {
+ render action: :show
+ }
end
else
respond_to do |format|
format.html {
render action: :edit
}
- format.json
+ format.json {
+ render json: @content_block.errors, status: :unprocessable_entity
+ }
end
end
end
private