Sha256: c8eb8cdff326256c569638e44e3874f8b8f0baddd422e1d6bc8018cea0cbc6cf

Contents?: true

Size: 298 Bytes

Versions: 1

Compression:

Stored size: 298 Bytes

Contents

module Bodega
  module ApplicationHelper
    def button_to_cart(product, label = 'Add to Cart')
      form_tag(bodega.add_path) do
        hidden_field_tag('product[type]', product.class) +
        hidden_field_tag('product[id]', product.id) +
        button_tag(label)
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
bodega-0.2.0 app/helpers/bodega/application_helper.rb