small medium large xlarge

Generic-user-small
30 May 2014, 16:03
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?

Lukejernejcic001_pragsmall
01 Jun 2014, 00:15
Luke Jernejcic (2 posts)

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

Generic-user-small
06 Jun 2014, 19:50
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