Commit 0f74d99a
Changed files (2)
app
views
creations
home
app/views/creations/index.html.erb
@@ -1,9 +1,15 @@
<div class="welcomeHolder">
<div class="welcome">
+ <% if @creations.any? %>
<a href="<%= url_for @creations[0] %>">
<%= image_tag @creations[0].image_url.to_s, :width => 417, :height => 205, :class => 'photo' %>
</a>
+ <% else %>
+ <a href="<%= url_for @creations[0] %>">
+ <%= image_tag "cakes/Camouflage_Truck.jpg", :width => 417, :height => 205, :class => 'photo' %>
+ </a>
+ <% end %>
<h1>Browse All Creations</h1>
<p><em>What time is it? Nana, nana, naaaaana caake time!</em></p>
<p>Check out our communities most recent cake work.</p>
app/views/home/index.html.erb
@@ -1,8 +1,14 @@
<div class="welcomeHolder">
<div class="welcome">
+ <% if @creations.any? %>
<a href="<%= url_for @creations[0] %>">
<%= image_tag @creations[0].image_url.to_s, :width => 417, :height => 205, :class => 'photo' %>
</a>
+ <% else %>
+ <a href="<%= url_for @creations[0] %>">
+ <%= image_tag "cakes/Camouflage_Truck.jpg", :width => 417, :height => 205, :class => 'photo' %>
+ </a>
+ <% end %>
<h1>Welcome to the CakeSide</h1>
<p><em>An online community for cake artists, enthusiasists and eaters.</em></p>
<p align="right">