Method: EffectiveCartsHelper#link_to_empty_cart
- Defined in:
- app/helpers/effective_carts_helper.rb
#link_to_empty_cart(opts = {}) ⇒ Object
75 76 77 78 79 80 81 82 83 84 85 86 87 88 |
# File 'app/helpers/effective_carts_helper.rb', line 75 def link_to_empty_cart(opts = {}) = { label: 'Empty Cart', class: 'btn btn-danger', rel: :nofollow, data: { confirm: 'This will clear your entire cart. Are you sure?' }, method: :delete }.merge(opts) label = .delete(:label) [:class] = (([:class] || '') + ' btn-empty-cart') link_to(label, effective_orders.cart_path, ) end |