diff app/controllers/tweets_controller.rb @ 67:5dd24a65547b

Should be screen name (@-name), not just name.
author nanaya <me@myconan.net>
date Tue, 01 Dec 2015 01:36:45 +0900
parents 1161ad2a4390
children fe5ea9b86091
line wrap: on
line diff
--- a/app/controllers/tweets_controller.rb	Tue Dec 01 01:34:12 2015 +0900
+++ b/app/controllers/tweets_controller.rb	Tue Dec 01 01:36:45 2015 +0900
@@ -28,7 +28,7 @@
 
   def try_redirect
     user = Tweet.new(params[:id]).user
-    redirect_to tweet_path("#{user.id}/#{user.name}")
+    redirect_to tweet_path("#{user.id}/#{user.screen_name}")
   rescue Twitter::Error::NotFound
     head :not_found
   end