comparison app/controllers/tweets_controller.rb @ 87:b01b5265e6d1

Whoops, forgot to rescue somewhere else
author nanaya <me@myconan.net>
date Mon, 27 Jun 2016 06:01:39 +0900
parents 5bfc986200db
children 32c8c150cd80
comparison
equal deleted inserted replaced
86:5bfc986200db 87:b01b5265e6d1
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.screen_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 rescue Twitter::Error::Unauthorized
35 head :forbidden
34 end 36 end
35 end 37 end