def delete_link(resource, options: {}, html_options: {}, &block)
      return if unauthorized? :destroy, extract(resource)

      html_options, block = LinkOptionsNormalizer.normalize(
        html_options, block,
        class: 'resource__destroy',
        block: -> { t 'links.delete' }
      )

      html_options[:method] ||= :delete
      html_options[:data] ||= {}
      html_options[:data][:confirm] ||= t 'links.confirm.delete'

      link_to show_path(resource, HashUtils.slice!(options, :is_resource, :url_params)), html_options, &block
    end
def delete_link(resource, options: {}, html_options: {}, &block)
      return if unauthorized? :destroy, extract(resource)

      html_options, block = LinkOptionsNormalizer.normalize(
        html_options, block,
        class: 'resource__destroy',
        block: -> { t 'links.delete' }
      )

      html_options[:method] ||= :delete
      html_options[:data] ||= {}
      html_options[:data][:confirm] ||= t 'links.confirm.delete'

      link_to show_path(resource, HashUtils.slice!(options, :is_resource, :url_params)), html_options, &block
    end
Return link to delete action by a given model class

 If user's not authorized, nil will be returned
 @param resource [Object, Wallaby::ResourceDecorator] model class
 @param html_options [Hash] (@see ActionView::Helpers::UrlHelper#link_to)
 @return [String, nil] anchor element