diff --git a/app/models/tag_subscription.rb b/app/models/tag_subscription.rb index 270b3774a..110f4e26c 100644 --- a/app/models/tag_subscription.rb +++ b/app/models/tag_subscription.rb @@ -12,6 +12,10 @@ class TagSubscription < ActiveRecord::Base self.name = name.gsub(/\W/, "_") end + def pretty_name + name.tr("_", " ") + end + def initialize_creator self.creator_id = CurrentUser.id end diff --git a/app/views/tag_subscriptions/index.html.erb b/app/views/tag_subscriptions/index.html.erb index c91e11320..edef650fd 100644 --- a/app/views/tag_subscriptions/index.html.erb +++ b/app/views/tag_subscriptions/index.html.erb @@ -4,7 +4,6 @@
| Creator | Name | Tag Query | <% if CurrentUser.is_admin? %> @@ -16,8 +15,7 @@|||
|---|---|---|---|---|---|
| <%= link_to tag_subscription.creator.name, user_path(tag_subscription.creator_id) %> | -<%= tag_subscription.name %> | +<%= tag_subscription.pretty_name %> | <%= tag_subscription.tag_query %> | <%= tag_subscription.post_id_array.size %> |
diff --git a/app/views/users/show.html.erb b/app/views/users/show.html.erb
index 2f80b6a7e..f8e18f5d9 100644
--- a/app/views/users/show.html.erb
+++ b/app/views/users/show.html.erb
@@ -34,7 +34,7 @@
Subscriptions<% @presenter.subscriptions.each do |subscription| %>
- <%= link_to subscription.name, posts_path(:tags => "sub:#{@user.name}:#{subscription.name}") %>+<%= link_to subscription.pretty_name, posts_path(:tags => "sub:#{@user.name}:#{subscription.name}") %>
<% @presenter.posts_for_subscription(subscription).each do |post| %>
|