diff --git a/app/helpers/albums_helper.rb b/app/helpers/albums_helper.rb index 338f26ec9..337ce608f 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 3e4bf3483..bf28846b5 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))