Mercurial > rsstweet
annotate app/controllers/tweets_controller.rb @ 50:3f419d621b06
Rename config option.
Changed in rails 4.2.
| author | nanaya <me@myconan.net> |
|---|---|
| date | Thu, 23 Apr 2015 16:30:47 +0900 |
| parents | 8983c426e256 |
| children | 8f68ca606099 |
| rev | line source |
|---|---|
| 15 | 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 | 5 def show |
|
48
8983c426e256
Prevent exploding on empty timeline.
nanaya <me@myconan.net>
parents:
38
diff
changeset
|
6 client = Tweet.new(params[:id]) |
|
8983c426e256
Prevent exploding on empty timeline.
nanaya <me@myconan.net>
parents:
38
diff
changeset
|
7 @tweets = client.timeline |
|
8983c426e256
Prevent exploding on empty timeline.
nanaya <me@myconan.net>
parents:
38
diff
changeset
|
8 @user = client.user |
| 25 | 9 rescue Twitter::Error::NotFound |
| 10 head :not_found | |
| 11 rescue Twitter::Error::Unauthorized | |
| 12 head :forbidden | |
| 15 | 13 end |
| 14 end |
