diff --git a/app/controllers/posts_controller.rb b/app/controllers/posts_controller.rb index a2905dee5..9ea4ca3ee 100644 --- a/app/controllers/posts_controller.rb +++ b/app/controllers/posts_controller.rb @@ -30,10 +30,6 @@ class PostsController < ApplicationController notification.save end - if is_mobile_device? - @comments = @post.comments - end - respond_to do |format| format.xml{ render :xml => @post.to_diaspora_xml } format.mobile{render 'posts/show.mobile.haml'} diff --git a/app/views/shared/_stream_element.mobile.haml b/app/views/shared/_stream_element.mobile.haml index d0d1df44f..cbe35079b 100644 --- a/app/views/shared/_stream_element.mobile.haml +++ b/app/views/shared/_stream_element.mobile.haml @@ -37,7 +37,7 @@ = post.likes.size %ul.comments - = render :partial => 'comments/comment', :collection => @comments, :locals => {:post => post} + = render :partial => 'comments/comment', :collection => post.comments, :locals => {:post => post} %li.comment.add_comment_bottom_link_container = link_to "Add a comment", new_post_comment_path(post), :class => 'add_comment_bottom_link btn comment_action inactive'