Commit 5a312b44

mo khan <mo@mokhan.ca>
2013-07-01 20:15:32
add linke to creations#mine in the settings tabs
1 parent 24777e2
Changed files (3)
app/controllers/creations_controller.rb
@@ -53,6 +53,6 @@ class CreationsController < ApplicationController
   end
 
   def mine
-    @creations = current_user.creations
+    @creations = current_user.creations.page(params[:page]).per(12)
   end
 end
app/views/creations/mine.html.erb
@@ -0,0 +1,7 @@
+<%= render :partial => "shared/account_nav", :locals => { :selected => :creations } %>
+<div class="row">
+  <div class="span12">
+    <h1><%= @user.name %> <small>A member since <%= @user.created_at.to_s :foomat %>, with <%= @user.creations.length %> creations.</small> </h1>
+    <%= render "shared/creation_image_gallery" %>
+  </div>
+</div>
app/views/shared/_account_nav.html.erb
@@ -4,7 +4,7 @@
       <li class="<%= selected == :basic_info ? "active" : "" %>"><%= link_to "Settings", settings_path %></li>
       <li class="<%= selected == :password ? "active" : "" %>"><%= link_to "Password", passwords_path %></li>
       <li class="<%= selected == :picture ? "active" : "" %>"><%= link_to "Picture", edit_avatar_path(@user) %></li>
-      <li class="<%= selected == :profile ? "active" : "" %>"><%= link_to "Creations", profile_path(@user) %></li>
+      <li class="<%= selected == :creations ? "active" : "" %>"><%= link_to "Creations", mine_creations_path %></li>
       <li class="<%= selected == :favorites ? "active" : "" %>"><%= link_to "Favorites", profiles_favorites_path %></li>
     </ul>
   </div>