def destroy_relay_field
      # find post field
      child_field = LatoBlog::PostField.find_by(id: params[:id])
      @post_field = child_field.post_field
      unless @post_field
        @error = true
        respond_to { |r| r.js }
      end
      # find post field child and destroy it
      unless child_field.destroy
        @error = true
        respond_to { |r| r.js }
      end
      # send response to client
      @error = false
      respond_to { |r| r.js }
    end
def destroy_relay_field
      # find post field
      child_field = LatoBlog::PostField.find_by(id: params[:id])
      @post_field = child_field.post_field
      unless @post_field
        @error = true
        respond_to { |r| r.js }
      end
      # find post field child and destroy it
      unless child_field.destroy
        @error = true
        respond_to { |r| r.js }
      end
      # send response to client
      @error = false
      respond_to { |r| r.js }
    end
This function destroy a post for the field.