Sha256: ddfcb89f31df574d36c34eb9da6276b8926e8b4f47c4a0442066a07481065ebf

Contents?: true

Size: 1.4 KB

Versions: 12

Compression:

Stored size: 1.4 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">
    <%= f.submit  class:  "card" %>
  </div>
<% end %>

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
wordjelly-auth-1.1.0 app/views/auth/shopping/cart_items/_form.html.erb
wordjelly-auth-1.0.9 app/views/auth/shopping/cart_items/_form.html.erb
wordjelly-auth-1.0.8 app/views/auth/shopping/cart_items/_form.html.erb
wordjelly-auth-1.0.5 app/views/auth/shopping/cart_items/_form.html.erb
wordjelly-auth-1.0.4 app/views/auth/shopping/cart_items/_form.html.erb
wordjelly-auth-1.0.3 app/views/auth/shopping/cart_items/_form.html.erb
wordjelly-auth-1.0.2 app/views/auth/shopping/cart_items/_form.html.erb
wordjelly-auth-0.0.8 app/views/auth/shopping/cart_items/_form.html.erb
wordjelly-auth-0.0.5 app/views/auth/shopping/cart_items/_form.html.erb
wordjelly-auth-0.0.4 app/views/auth/shopping/cart_items/_form.html.erb
wordjelly-auth-0.0.3 app/views/auth/shopping/cart_items/_form.html.erb
wordjelly-auth-0.0.1 app/views/auth/shopping/cart_items/_form.html.erb