From d1cf30819396ef5c17e8b8d92330e65f1349c530 Mon Sep 17 00:00:00 2001 From: albert Date: Wed, 14 Sep 2011 17:47:39 -0400 Subject: [PATCH] fixes #70: "_" not a blank space in pool names --- app/models/pool.rb | 4 ++++ app/views/posts/partials/show/_pools.html.erb | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/app/models/pool.rb b/app/models/pool.rb index dda6bdaaf..706948775 100644 --- a/app/models/pool.rb +++ b/app/models/pool.rb @@ -46,6 +46,10 @@ class Pool < ActiveRecord::Base self.creator_id = CurrentUser.id end + def pretty_name + name.tr("_", " ") + end + def normalize_name self.name = self.class.normalize_name(name) end diff --git a/app/views/posts/partials/show/_pools.html.erb b/app/views/posts/partials/show/_pools.html.erb index 50c1217ba..f5432beaf 100644 --- a/app/views/posts/partials/show/_pools.html.erb +++ b/app/views/posts/partials/show/_pools.html.erb @@ -11,7 +11,7 @@ <% else %> » <% end %> - <%= link_to pool.name, pool_path(pool) %> + <%= link_to pool.pretty_name, pool_path(pool) %> <% end %> \ No newline at end of file