We don't need to check defined? on an instance variable

This commit is contained in:
Raphael Sofaer 2011-08-05 23:04:30 -07:00
parent 817d6701e4
commit de3f27f8b1

View file

@ -54,7 +54,7 @@
= t('.via', :link => link_to("#{post.provider_display_name}", post.actor_url)).html_safe
·
- unless (defined?(@commenting_disabled) && @commenting_disabled)
- unless @commenting_disabled
%span.like_action
= like_action(post, current_user)
@ -69,4 +69,4 @@
.likes.on_post
= render "likes/likes_container", :target_id => post.id, :likes_count => post.likes_count, :current_user => current_user, :target_type => "Post"
= render "comments/comments", :post => post, :current_user => current_user, :commenting_disabled => (defined?(@commenting_disabled) && @commenting_disabled)
= render "comments/comments", :post => post, :current_user => current_user, :commenting_disabled => @commenting_disabled