ruby - Spree: Deface getting error NameError in Spree::Home#index -


i'm trying change of front page items listed i'm getting error. using deface correctly change it? telling me <%= link_to small_image(product, itemprop: "image"), url, itemprop: 'url' %> giving me errors, if removed there no pictures. do?

update_products.rb

deface::override.new(:virtual_path =>"spree/shared/_products",                      :name => "change site",                      :replace =>"#products",                      :text => '    <%   paginated_products = @searcher.retrieve_products if params.key?(:keywords)   paginated_products ||= products %>  <% content_for :head %>   <% if paginated_products.respond_to?(:num_pages) %>     <%= rel_next_prev_link_tags paginated_products %>   <% end %> <% end %>  <div data-hook="products_search_results_heading">   <% if products.empty? %>     <div data-hook="products_search_results_heading_no_results_found">       <%= spree.t(:no_products_found) %>     </div>   <% elsif params.key?(:keywords) %>     <div data-hook="products_search_results_heading_results_found">       <h6 class="search-results-title"><%= spree.t(:search_results, keywords: h(params[:keywords])) %></h6>     </div>   <% end %> </div>  <% if products.any? %>   <div id="products" class="row" data-hook>     <% products.each |product| %>       <% url = spree.product_url(product, taxon_id: @taxon.try(:id)) %>       <div id="product_<%= product.id %>" class="col-md-3 col-sm-6 product-list-item" data-hook="products_list_item" itemscope itemtype="https://schema.org/product">         <div class="panel panel-default">           <% cache(@taxon.present? ? [i18n.locale, current_currency, @taxon, product] : [i18n.locale, current_currency, product]) %>             <div class="panel-body text-center product-body">               <br/> <%= link_to small_image(product, itemprop: "image"), url, itemprop: 'url' %>             </div>             <div class="panel-footer text-center">               <span itemprop="offers" itemscope itemtype="https://schema.org/offer">                 <span class="price selling lead" itemprop="price"><%= display_price(product) %></span>               </span>             </div>           <% end %>         </div>       </div>     <% end %>     <% reset_cycle("classes") %>   </div> <% end %>  <% if paginated_products.respond_to?(:num_pages) %>  <% end %> ') 

one small quote issue url <%= link_to small_image(product, itemprop: "image"), url, itemprop: "url" %> check code :-

deface::override.new(:virtual_path =>"spree/shared/_products",                      :name => "change site",                      :replace =>"#products",                      :text => '    <%   paginated_products = @searcher.retrieve_products if params.key?(:keywords)   paginated_products ||= products %>  <% content_for :head %>   <% if paginated_products.respond_to?(:num_pages) %>     <%= rel_next_prev_link_tags paginated_products %>   <% end %> <% end %>  <div data-hook="products_search_results_heading">   <% if products.empty? %>     <div data-hook="products_search_results_heading_no_results_found">       <%= spree.t(:no_products_found) %>     </div>   <% elsif params.key?(:keywords) %>     <div data-hook="products_search_results_heading_results_found">       <h6 class="search-results-title"><%= spree.t(:search_results, keywords: h(params[:keywords])) %></h6>     </div>   <% end %> </div>  <% if products.any? %>   <div id="products" class="row" data-hook>     <% products.each |product| %>       <% url = spree.product_url(product, taxon_id: @taxon.try(:id)) %>       <div id="product_<%= product.id %>" class="col-md-3 col-sm-6 product-list-item" data-hook="products_list_item" itemscope itemtype="https://schema.org/product">         <div class="panel panel-default">           <% cache(@taxon.present? ? [i18n.locale, current_currency, @taxon, product] : [i18n.locale, current_currency, product]) %>             <div class="panel-body text-center product-body">               <br/> <%= link_to small_image(product, itemprop: "image"), url, itemprop: "url" %>             </div>             <div class="panel-footer text-center">               <span itemprop="offers" itemscope itemtype="https://schema.org/offer">                 <span class="price selling lead" itemprop="price"><%= display_price(product) %></span>               </span>             </div>           <% end %>         </div>       </div>     <% end %>     <% reset_cycle("classes") %>   </div> <% end %>  <% if paginated_products.respond_to?(:num_pages) %>  <% end %> ') 

Comments

Popular posts from this blog

html - Outlook 2010 Anchor (url/address/link) -

javascript - Why does running this loop 9 times take 100x longer than running it 8 times? -

Getting gateway time-out Rails app with Nginx + Puma running on Digital Ocean -