app/controllers/spotlight/attachments_controller.rb in blacklight-spotlight-0.13.0 vs app/controllers/spotlight/attachments_controller.rb in blacklight-spotlight-0.14.0

- old
+ new

@@ -7,14 +7,11 @@ load_and_authorize_resource through: :exhibit # POST /attachments def create @attachment.attributes = attachment_params - if @attachment.save - render json: @attachment - else - render action: 'new' - end + @attachment.save! + render json: @attachment end private # Only allow a trusted parameter "white list" through.