Skip to content

Commit

Permalink
We should only show the comments form if we're directly viewing the s…
Browse files Browse the repository at this point in the history
…nip to be commented on.
  • Loading branch information
lazyatom committed Jun 3, 2008
1 parent 78377d5 commit b996188
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/vanilla/dynasnips/comments.rb
Expand Up @@ -16,11 +16,11 @@ def get(snip_name=nil?)
return usage if self.class.snip_name == snip_name
comments = Soup.sieve(:commenting_on => snip_name)
comments_html = if app.request.snip_name == snip_name
render_comments(comments)
render_comments(comments) + comment_form.gsub('SNIP_NAME', snip_name)
else
%{<a href="#{Vanilla::Routes.url_to(snip_name)}">#{comments.length} comments for #{snip_name}</a>}
end
return comments_html + comment_form.gsub('SNIP_NAME', snip_name)
return comments_html
end

def post(*args)
Expand Down

0 comments on commit b996188

Please sign in to comment.