Sha256: cce040a7213aee11315ba1246ff47c426f50daa1c928724764b61a9d9e20233f
Contents?: true
Size: 1.46 KB
Versions: 47
Compression:
Stored size: 1.46 KB
Contents
<!-- in the products index action, this show fields is set to no, because we don't want to show the fields there --> <% show_fields ||= "yes" %> <%= form_for(@auth_shopping_cart_item, url: @auth_shopping_cart_item.new_record? ? cart_items_path : cart_item_path(@auth_shopping_cart_item), method: @auth_shopping_cart_item.new_record? ? :post : :put, namespace: @auth_shopping_cart_item.id.to_s) do |f| %> <% if @auth_shopping_cart_item.errors.any? %> <div id="error_explanation"> <h2><%= pluralize(@auth_shopping_cart_item.errors.count, "error") %> prohibited this auth_shopping_cart_item from being saved:</h2> <ul> <% @auth_shopping_cart_item.errors.full_messages.each do |message| %> <li><%= message %></li> <% end %> </ul> </div> <% end %> <div class="form_fields" style="<%= show_fields == "no" ? "display:none;" : "" %>"> <% @auth_shopping_cart_item.class.attribute_names.keep_if{|c| !@auth_shopping_cart_item.field_names_to_skip_while_making_form.include? c.to_s}.each do |attr| %> <%= text_field_tag "cart_item[#{attr}]" ,@auth_shopping_cart_item.send("#{attr}"), :id => "#{@auth_shopping_cart_item.id.to_s}_cart_item_#{attr}" %> <%= label_tag("#{@auth_shopping_cart_item.id.to_s}_cart_item_#{attr}") %> <% end %> </div> <div class="actions"> <a href="#" class="order_product_link">Order Now</a> <%= f.submit style: "display:none" %> </div> <% end %>
Version data entries
47 entries across 47 versions & 1 rubygems