Fix bug 376
This commit is contained in:
parent
de0b240dbb
commit
9f653e39f1
2 changed files with 9 additions and 1 deletions
|
|
@ -7,6 +7,14 @@ module ApplicationHelper
|
|||
!@aspect.is_a?(Symbol) && @aspect.id == aspect.id
|
||||
end
|
||||
|
||||
def aspect_or_all_path aspect
|
||||
if @aspect.is_a? Aspect
|
||||
aspect_path @aspect
|
||||
else
|
||||
aspects_path
|
||||
end
|
||||
end
|
||||
|
||||
def object_path(object, opts = {})
|
||||
object = object.person if object.is_a? User
|
||||
eval("#{object.class.to_s.underscore}_path(object, opts)")
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@
|
|||
%br
|
||||
%br
|
||||
%ul
|
||||
%li= link_to 'stream', aspect_path(@aspect)
|
||||
%li= link_to 'stream', aspect_or_all_path(@aspect)
|
||||
%li= link_to t('.photos'), albums_path(:aspect => @aspect)
|
||||
|
||||
%br
|
||||
|
|
|
|||
Loading…
Reference in a new issue