Commit 17d9c427

mo khan <mo@mokhan.ca>
2014-01-19 16:47:57
display tutorials on the dashboard.
1 parent 2ebb28b
Changed files (2)
app
app/controllers/dashboard_controller.rb
@@ -3,6 +3,7 @@ class DashboardController < ApplicationController
 
   def index
     @creations = current_user.creations
+    @tutorials = current_user.tutorials
     @activities = current_user.recent_activities
   end
 end
app/views/dashboard/index.html.erb
@@ -39,6 +39,17 @@
         </div>
       </div>
     <% end %>
+    <% @tutorials.each do |tutorial| %>
+      <div class="media">
+        <%= link_to tutorial, class: 'pull-left' do %>
+          <img class="media-object" data-src="<%= tutorial.image_url %>" alt="64x64" style="width: 64px; height: 64px;" src="<%= tutorial.image_url %>">
+        <% end %>
+        <div class="media-body">
+          <h4 class="media-heading"><%= tutorial.heading %></h4>
+          <%= tutorial.description %>
+        </div>
+      </div>
+    <% end %>
   </div>
   <div class="span5">
     <% @activities.each do |activity| %>