Given that we've got Rails, we might as well make use of some of the tools
they give us.  Especially given that they do pretty much the same thing we
just wrote.

Reviewed-By: Nick Lewis

Signed-off-by: Pieter van de Bruggen <[email protected]>
---
Local-branch: tickets/next/7537
 app/views/reports/_report.html.haml |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/app/views/reports/_report.html.haml 
b/app/views/reports/_report.html.haml
index d6d641c..54da713 100644
--- a/app/views/reports/_report.html.haml
+++ b/app/views/reports/_report.html.haml
@@ -8,8 +8,7 @@
       %li= link_to 'Destroy', report, :confirm => 'Are you sure?', :method => 
:delete, :class => "delete button"
 
 .item
-  - user_facing = Hash.new do |hash, key|
-    - hash[key] = key[/[a-z].*/i].gsub('_', ' ').gsub(/\b\w/) { |m| m.upcase }
+  - user_facing = Hash.new { |hash, key| hash[key] = key[/[a-z].*/i].titleize }
   - user_facing.update '600_resource_statuses' => 'Events'
   - panels = []
   %ul#report-tabs
-- 
1.7.5.1

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Developers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/puppet-dev?hl=en.

Reply via email to