Sha256: aa413d44fdca5d05dac8078c01f0694b8b1dc930f5516be74cd05034daaf6dd6
Contents?: true
Size: 765 Bytes
Versions: 3
Compression:
Stored size: 765 Bytes
Contents
module KonoUtils::Object::Cell::Buttons # namespace class Delete < Base def url_to options[:url_to] || destroy_custom_polymorphic_path(model) end def specific_button_class 'btn-danger' end def btn_opts(opts = {}) custom_options = options.dig(:button_options) || opts super(automatic_remove_options.merge(custom_options)) end ## # Metodo che รจ possibili fare override per rimuovere le funzioni di rails di conferma automatica def automatic_remove_options { method: :delete, data: {confirm: t(:are_you_sure), title: I18n.t('kono_utils.bootstrap4.buttons.delete.title')}, } end def button_content options.fetch(:content, fa_icon("trash")) end end end
Version data entries
3 entries across 3 versions & 1 rubygems