myexperiment-hackers
[Top][All Lists]
Advanced

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

[myexperiment-hackers] [2991] trunk/app/helpers/application_helper.rb: i


From: noreply
Subject: [myexperiment-hackers] [2991] trunk/app/helpers/application_helper.rb: improved visible_name for multi word contributable names
Date: Wed, 16 May 2012 14:24:10 +0000 (UTC)

Revision
2991
Author
dgc
Date
2012-05-16 14:24:09 +0000 (Wed, 16 May 2012)

Log Message

improved visible_name for multi word contributable names

Modified Paths

Diff

Modified: trunk/app/helpers/application_helper.rb (2990 => 2991)


--- trunk/app/helpers/application_helper.rb	2012-05-13 18:06:24 UTC (rev 2990)
+++ trunk/app/helpers/application_helper.rb	2012-05-16 14:24:09 UTC (rev 2991)
@@ -876,7 +876,7 @@
     if (entity.instance_of?(String))
       name = entity
     elsif (entity.class == Class)
-      name = entity.to_s
+      name = entity.name.underscore.split("_").map do |bit| bit.capitalize end.join(" ")
     else
       name = entity.class.to_s
     end

reply via email to

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