diff --git a/views/_news_profile_comment.erb b/views/_news_profile_comment.erb index 7e20bb7d..7cf43e89 100644 --- a/views/_news_profile_comment.erb +++ b/views/_news_profile_comment.erb @@ -1,24 +1,26 @@ -<% actioning_site = profile_comment.actioning_site_dataset.select(:id, :username, :stripe_customer_id, :plan_type, :parent_site_id).first %> -<% site = profile_comment.site_dataset.select(:id, :username, :stripe_customer_id, :plan_type, :parent_site_id).first %> +<% if profile_comment %> + <% actioning_site = profile_comment.actioning_site_dataset.select(:id, :username, :stripe_customer_id, :plan_type, :parent_site_id).first %> + <% site = profile_comment.site_dataset.select(:id, :username, :stripe_customer_id, :plan_type, :parent_site_id).first %> -
-
+
+
-
- <% if current_site && current_site.id == actioning_site.id %> - You - <% else %> - <% if actioning_site.supporter? %><% end %><%= actioning_site.username %> - <% end %> +
+ <% if current_site && current_site.id == actioning_site.id %> + You + <% else %> + <% if actioning_site.supporter? %><% end %><%= actioning_site.username %> + <% end %> - <% if actioning_site.id != profile_comment.site_id %> - - <% if profile_comment.site.supporter? %><% end %><%= profile_comment.site.username %> - <% end %> + <% if actioning_site.id != profile_comment.site_id %> + + <% if profile_comment.site.supporter? %><% end %><%= profile_comment.site.username %> + <% end %> +
+ + + <%= profile_comment.created_at.ago %> +
- - - <%= profile_comment.created_at.ago %> - -
-
<%== sanitize_comment profile_comment.message %>
+
<%== sanitize_comment profile_comment.message %>
+<% end %> \ No newline at end of file