No need for defined?

This commit is contained in:
Raphael 2010-11-29 12:10:41 -08:00
parent e0efaa6317
commit 760fed7016
2 changed files with 4 additions and 4 deletions

View file

@ -2,7 +2,7 @@
-# licensed under the Affero General Public License version 3 or later. See
-# the COPYRIGHT file.
%ul.comments{:id => post_id, :class => ("hidden" if defined?(hidden) && hidden)}
%ul.comments{:id => post_id, :class => ("hidden" if comment_hashes.size == 0)}
- for comment_hash in comment_hashes
= render 'comments/comment', comment_hash
%li.comment.show

View file

@ -25,11 +25,11 @@
= render 'shared/reshare', :current_user => current_user, :post => post if post.is_a? StatusMessage
= link_to t('delete'), object_path(post), :confirm => t('are_you_sure'), :method => :delete, :remote => true, :class => "delete"
= render type_partial(post), :post => post
= render 'status_messages/status_message', :post => post
.info
%span.time= link_to(how_long_ago(post), object_path(post))
%span.time= link_to(how_long_ago(post), status_message_path(post))
= comment_toggle(comments.length)
= render "comments/comments", :post_id => post.id, :comment_hashes => comments, :hidden => (comments.length == 0)
= render "comments/comments", :post_id => post.id, :comment_hashes => comments