Commit 353282e8

mo khan <mo@mokhan.ca>
2014-10-29 04:46:35
remove author and date and use fixed with image on tutorials page.
1 parent 39aee01
Changed files (2)
app
app/controllers/tutorials_controller.rb
@@ -1,6 +1,6 @@
 class TutorialsController < ApplicationController
   def index
-    @tutorials = Tutorial.includes(:user).search(params[:q]).page(page).per(per_page)
+    @tutorials = Tutorial.search(params[:q]).page(page).per(per_page)
   end
 
   def show
app/views/tutorials/index.html.erb
@@ -6,12 +6,10 @@
         <li class="span2">
           <div class="thumbnail">
             <%= link_to tutorial do %>
-              <%= image_tag tutorial.image_url %>
+              <%= image_tag tutorial.image_url, width: 240 %>
             <% end %>
             <div class="caption">
-              <h4><%= link_to shrink(tutorial.heading, 12), tutorial %></h4>
-              <p><%= link_to shrink(tutorial.user.name, 20), profile_path(tutorial.user) %></p>
-              <p><small><%= time_ago_in_words(tutorial.created_at) %> ago.</small></p>
+              <small><%= link_to shrink(tutorial.heading, 20), tutorial %></small>
             </div>
           </div>
         </li>