30 May 2014, 16:03
Generic-user-small

James Stephenson (2 posts)

I just started going through the Depot tutorial and ran into an odd thing. After applying the CSS in Depot-a, when access the page the data appears twice on the screen. The first part if formatted with the CSS just added, but the bottom lists the records in the format that the scaffold process creates.

Any ideas why?

01 Jun 2014, 00:15
Lukejernejcic001_pragsmall

Luke Jernejcic (2 posts)

Post the code for your view and we might get a better idea of what’s going on.

06 Jun 2014, 19:50
Generic-user-small

James Stephenson (2 posts)

Here is my index.html.erb ~~~

Listing products

<% @products.each do |product| %> <%= image_tag(product.image_url, class: 'list_image') %>
<%= product.title %>
<%= truncate(strip_tags(product.description), length: 80) %>
<%= link_to 'Show', product %>
<%= link_to 'Edit', edit_product_path(product) %>
<%= link_to 'Destroy', product, method: :delete, data: { confirm: 'Are you sure?' } %> <% end %>


<%= link_to ‘New product’, new_product_path %> ~~~ And my application layout ~~~ <!DOCTYPE html>

Depot <%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' => true %> <%= javascript_include_tag 'application', 'data-turbolinks-track' => true %> <%= csrf_meta_tags %> <%= yield %>

~~~

  You must be logged in to comment