From 2193ff2b5821c2460e293213e72eac16d672f6cc Mon Sep 17 00:00:00 2001
From: Steffen van Bergerem <svbergerem@online.de>
Date: Fri, 13 Feb 2015 12:25:50 +0100
Subject: [PATCH] Remove last_post from PeopleController

---
 app/controllers/people_controller.rb | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/app/controllers/people_controller.rb b/app/controllers/people_controller.rb
index e788c85298..f8a1ae2336 100644
--- a/app/controllers/people_controller.rb
+++ b/app/controllers/people_controller.rb
@@ -3,7 +3,7 @@
 #   the COPYRIGHT file.
 
 class PeopleController < ApplicationController
-  before_action :authenticate_user!, except: [:show, :stream, :last_post]
+  before_action :authenticate_user!, except: [:show, :stream]
   before_action :find_person, only: [:show, :stream, :hovercard]
 
   layout ->(c){ request.format == :mobile ? "application" : "with_header_with_footer" }
@@ -128,12 +128,6 @@ class PeopleController < ApplicationController
     end
   end
 
-  def last_post
-    @person = Person.find_from_guid_or_username(params)
-    last_post = Post.visible_from_author(@person, current_user).order('posts.created_at DESC').first
-    redirect_to post_path(last_post)
-  end
-
   def retrieve_remote
     if params[:diaspora_handle]
       Webfinger.in_background(params[:diaspora_handle], :single_aspect_form => true)
-- 
GitLab