myexperiment-hackers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[myexperiment-hackers] [1904] branches/event_logging/app/helpers/applica


From: noreply
Subject: [myexperiment-hackers] [1904] branches/event_logging/app/helpers/application_helper.rb: News.
Date: Thu, 30 Oct 2008 08:21:37 -0400 (EDT)

Revision
1904
Author
alekses6
Date
2008-10-30 08:21:36 -0400 (Thu, 30 Oct 2008)

Log Message

News. Bug-fix: display name for groups in "tag"-related news entries shown properly now.

Modified Paths

Diff

Modified: branches/event_logging/app/helpers/application_helper.rb (1903 => 1904)


--- branches/event_logging/app/helpers/application_helper.rb	2008-10-30 12:13:01 UTC (rev 1903)
+++ branches/event_logging/app/helpers/application_helper.rb	2008-10-30 12:21:36 UTC (rev 1904)
@@ -451,12 +451,18 @@
   end
   
   # used to return the "visible" part for links to contributable
+  #
+  # NB! although not designed for groups, still used in some places - so
+  # method name left unchanged, but functionality for groups added 
   def contributable_name_from_instance(contributable)
     case contributable.class.to_s
       when "Workflow", "Pack"
         return contributable.title
       when "Blob"
         return ((contributable.title && contributable.title.length > 0) ? h(contributable.title) : h(contributable.local_name))
+      when "Network"
+        # title is required for groups
+        return contributable.title
       else
         return "(#{contributable.class.to_s},#{contributable.id})"
     end

reply via email to

[Prev in Thread] Current Thread [Next in Thread]