the album create doesn't crash the app
This commit is contained in:
parent
00c80ed662
commit
3243435015
2 changed files with 1 additions and 10 deletions
|
|
@ -14,13 +14,4 @@ module AlbumsHelper
|
||||||
'Your Albums'
|
'Your Albums'
|
||||||
end
|
end
|
||||||
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
|
end
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@
|
||||||
|
|
||||||
%div.time
|
%div.time
|
||||||
by
|
by
|
||||||
= album_person(post)
|
= link_to ((current_user.person == post.person)? 'you' : post.person.real_name), person_path(post.person)
|
||||||
%br
|
%br
|
||||||
= link_to(how_long_ago(post), object_path(post))
|
= link_to(how_long_ago(post), object_path(post))
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue