annotate app/controllers/tweets_controller.rb @ 44:541427960031

Fix rubocop compliance.
author edogawaconan <me@myconan.net>
date Thu, 11 Dec 2014 16:08:22 +0900
parents 9e03bbbb1d43
children 8983c426e256
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
15
207917e41964 Add tweets~
edogawaconan <me@myconan.net>
parents:
diff changeset
1 class TweetsController < ApplicationController
38
9e03bbbb1d43 Move static#index to tweet#index.
edogawaconan <me@myconan.net>
parents: 28
diff changeset
2 def index
9e03bbbb1d43 Move static#index to tweet#index.
edogawaconan <me@myconan.net>
parents: 28
diff changeset
3 end
9e03bbbb1d43 Move static#index to tweet#index.
edogawaconan <me@myconan.net>
parents: 28
diff changeset
4
15
207917e41964 Add tweets~
edogawaconan <me@myconan.net>
parents:
diff changeset
5 def show
207917e41964 Add tweets~
edogawaconan <me@myconan.net>
parents:
diff changeset
6 @tweets = Tweet.new(params[:id]).timeline
28
03f904c070f7 Basic caching support.
edogawaconan <me@myconan.net>
parents: 25
diff changeset
7
15
207917e41964 Add tweets~
edogawaconan <me@myconan.net>
parents:
diff changeset
8 @user = @tweets.first.user
25
70d70736faee Properly rescue 403 and 404.
edogawaconan <me@myconan.net>
parents: 15
diff changeset
9 rescue Twitter::Error::NotFound
70d70736faee Properly rescue 403 and 404.
edogawaconan <me@myconan.net>
parents: 15
diff changeset
10 head :not_found
70d70736faee Properly rescue 403 and 404.
edogawaconan <me@myconan.net>
parents: 15
diff changeset
11 rescue Twitter::Error::Unauthorized
70d70736faee Properly rescue 403 and 404.
edogawaconan <me@myconan.net>
parents: 15
diff changeset
12 head :forbidden
15
207917e41964 Add tweets~
edogawaconan <me@myconan.net>
parents:
diff changeset
13 end
207917e41964 Add tweets~
edogawaconan <me@myconan.net>
parents:
diff changeset
14 end