Sha256: e17be96465034ad0a4530a2692d6d3ccf070a97fa7fa91cc6f5e75f5d542bde1
Contents?: true
Size: 408 Bytes
Versions: 6
Compression:
Stored size: 408 Bytes
Contents
# frozen_string_literal: true # Credits: viget.com/articles/delete-in-rails-without-jquery-and-ujs/ module DeleteLinkHelper def delete_button_to(title, url, options = {}) html_options = { class: "delete_button_to", method: "delete" }.merge(options.delete(:html_options) || {}) form_for :delete, url: url, html: html_options do |f| f.submit title, options end end end
Version data entries
6 entries across 6 versions & 1 rubygems