comparison app/controllers/tweets_controller.rb @ 28:03f904c070f7

Basic caching support.
author edogawaconan <me@myconan.net>
date Sat, 06 Sep 2014 00:46:25 +0900
parents 70d70736faee
children 9e03bbbb1d43
comparison
equal deleted inserted replaced
27:efc548be0a3a 28:03f904c070f7
1 class TweetsController < ApplicationController 1 class TweetsController < ApplicationController
2 def show 2 def show
3 @tweets = Tweet.new(params[:id]).timeline 3 @tweets = Tweet.new(params[:id]).timeline
4
4 @user = @tweets.first.user 5 @user = @tweets.first.user
5 rescue Twitter::Error::NotFound 6 rescue Twitter::Error::NotFound
6 head :not_found 7 head :not_found
7 rescue Twitter::Error::Unauthorized 8 rescue Twitter::Error::Unauthorized
8 head :forbidden 9 head :forbidden