diff options
| author | mo <mo.khan@gmail.com> | 2017-09-22 21:17:27 -0600 |
|---|---|---|
| committer | mo <mo.khan@gmail.com> | 2017-09-22 21:17:27 -0600 |
| commit | c303cd07b7d14c699eaa7bfbff9a888796f77cfc (patch) | |
| tree | 144d6e5c934221b0cf423eab0c5119307feed877 /app/views/cakes/_cake.html.erb | |
| parent | cc3cc4199554c252ae3baa3ce5418c2ebaaf5a18 (diff) | |
cache each cake card.
Diffstat (limited to 'app/views/cakes/_cake.html.erb')
| -rw-r--r-- | app/views/cakes/_cake.html.erb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/app/views/cakes/_cake.html.erb b/app/views/cakes/_cake.html.erb new file mode 100644 index 00000000..edfd983b --- /dev/null +++ b/app/views/cakes/_cake.html.erb @@ -0,0 +1,9 @@ +<div id="cake-<%= cake.id %>" class='card' data-autoview="cake-card"> + <%= link_to cake_path(cake) do %> + <%= image_tag cake.primary_image.url_for(:thumb), alt: cake.name, class: 'card-img-top' %> + <% end %> + <div class="card-body"> + <h4 class="card-title"><%= cake.name %></h4> + <p class="card-text"><small class="text-muted"><%= local_time(cake.created_at) %></small></p> + </div> +</div> |
