From 3243435015a8a73c83acf9b83d39b75a2aa82cf3 Mon Sep 17 00:00:00 2001
From: ilya <ilya@laptop.(none)>
Date: Wed, 18 Aug 2010 20:14:31 -0700
Subject: [PATCH] the album create doesn't crash the app

---
 app/helpers/albums_helper.rb      | 9 ---------
 app/views/albums/_album.html.haml | 2 +-
 2 files changed, 1 insertion(+), 10 deletions(-)

diff --git a/app/helpers/albums_helper.rb b/app/helpers/albums_helper.rb
index 338f26ec91..337ce608f0 100644
--- a/app/helpers/albums_helper.rb
+++ b/app/helpers/albums_helper.rb
@@ -14,13 +14,4 @@ module AlbumsHelper
       'Your Albums'
     end
   end
-  
-  def album_person(album)
-    person = album.person
-    if album.person_id == current_user.person.id
-      link_to "you", user_path(current_user)
-    else
-      link_to person.real_name, person_path(person)
-    end
-  end
 end
diff --git a/app/views/albums/_album.html.haml b/app/views/albums/_album.html.haml
index 3e4bf3483c..bf28846b5e 100644
--- a/app/views/albums/_album.html.haml
+++ b/app/views/albums/_album.html.haml
@@ -5,7 +5,7 @@
 
     %div.time
       by
-      = album_person(post)
+      = link_to ((current_user.person == post.person)? 'you' : post.person.real_name), person_path(post.person)
       %br
       = link_to(how_long_ago(post), object_path(post))
 
-- 
GitLab