comparison 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
comparison
equal deleted inserted replaced
66:1161ad2a4390 67:5dd24a65547b
26 end 26 end
27 end 27 end
28 28
29 def try_redirect 29 def try_redirect
30 user = Tweet.new(params[:id]).user 30 user = Tweet.new(params[:id]).user
31 redirect_to tweet_path("#{user.id}/#{user.name}") 31 redirect_to tweet_path("#{user.id}/#{user.screen_name}")
32 rescue Twitter::Error::NotFound 32 rescue Twitter::Error::NotFound
33 head :not_found 33 head :not_found
34 end 34 end
35 end 35 end