diff options
Diffstat (limited to 'app')
-rw-r--r-- | app/controllers/tweets_controller.rb | 34 | ||||
-rw-r--r-- | app/views/tweets/user_best.html.haml (renamed from app/views/tweets/best.html.haml) | 0 | ||||
-rw-r--r-- | app/views/tweets/user_discovered_by.atom.builder (renamed from app/views/tweets/discovered_by.atom.builder) | 0 | ||||
-rw-r--r-- | app/views/tweets/user_discovered_by.html.haml (renamed from app/views/tweets/discovered_by.html.haml) | 0 | ||||
-rw-r--r-- | app/views/tweets/user_discoveries.atom.builder (renamed from app/views/tweets/discoveries.atom.builder) | 0 | ||||
-rw-r--r-- | app/views/tweets/user_discoveries.html.haml (renamed from app/views/tweets/discoveries.html.haml) | 0 | ||||
-rw-r--r-- | app/views/tweets/user_favorites.html.haml (renamed from app/views/tweets/favorites.html.haml) | 0 | ||||
-rw-r--r-- | app/views/tweets/user_recent.html.haml (renamed from app/views/tweets/recent.html.haml) | 0 | ||||
-rw-r--r-- | app/views/tweets/user_retweets.html.haml (renamed from app/views/tweets/retweets.html.haml) | 0 | ||||
-rw-r--r-- | app/views/tweets/user_timeline.atom.builder (renamed from app/views/tweets/timeline.atom.builder) | 0 | ||||
-rw-r--r-- | app/views/tweets/user_timeline.html.haml (renamed from app/views/tweets/timeline.html.haml) | 0 |
11 files changed, 17 insertions, 17 deletions
diff --git a/app/controllers/tweets_controller.rb b/app/controllers/tweets_controller.rb index 4a2590f..9a23739 100644 --- a/app/controllers/tweets_controller.rb +++ b/app/controllers/tweets_controller.rb @@ -1,14 +1,4 @@ class TweetsController < ApplicationController - def index - begin - best - render :best - rescue Aclog::Exceptions::AccountPrivate - timeline - render :timeline - end - end - def show @tweet = Tweet.find(params[:id]) @user = @tweet.user @@ -17,45 +7,55 @@ class TweetsController < ApplicationController @replies_after = @tweet.reply_descendants(2) end - def best + def user_index + begin + user_best + render :user_best + rescue Aclog::Exceptions::AccountPrivate + user_timeline + render :user_timeline + end + end + + def user_best @user = require_user authorize_to_show_user! @user authorize_to_show_user_best! @user @tweets = paginate_with_page_number(@user.tweets.reacted.order_by_reactions) end - def recent + def user_recent @user = require_user authorize_to_show_user! @user authorize_to_show_user_best! @user @tweets = paginate_with_page_number(@user.tweets.reacted.recent.order_by_reactions) end - def timeline + def user_timeline @user = require_user authorize_to_show_user! @user @tweets = paginate(@user.tweets.reacted(params[:reactions]).order_by_id) end - def discoveries + def user_discoveries @user = require_user authorize_to_show_user! @user @tweets = paginate(Tweet).discovered_by(@user).order_by_id end - def favorites + def user_favorites @user = require_user authorize_to_show_user! @user @tweets = paginate(Tweet).favorited_by(@user).order_by_id end - def retweets + def user_retweets @user = require_user authorize_to_show_user! @user @tweets = paginate(Tweet).retweeted_by(@user).order_by_id end - def discovered_by + def user_discovered_by @user = require_user authorize_to_show_user! @user @source_user = User.find(id: params[:user_id_b], screen_name: params[:screen_name_b]) diff --git a/app/views/tweets/best.html.haml b/app/views/tweets/user_best.html.haml index 6c12ef4..6c12ef4 100644 --- a/app/views/tweets/best.html.haml +++ b/app/views/tweets/user_best.html.haml diff --git a/app/views/tweets/discovered_by.atom.builder b/app/views/tweets/user_discovered_by.atom.builder index 18597db..18597db 100644 --- a/app/views/tweets/discovered_by.atom.builder +++ b/app/views/tweets/user_discovered_by.atom.builder diff --git a/app/views/tweets/discovered_by.html.haml b/app/views/tweets/user_discovered_by.html.haml index 63b0aeb..63b0aeb 100644 --- a/app/views/tweets/discovered_by.html.haml +++ b/app/views/tweets/user_discovered_by.html.haml diff --git a/app/views/tweets/discoveries.atom.builder b/app/views/tweets/user_discoveries.atom.builder index c4ecede..c4ecede 100644 --- a/app/views/tweets/discoveries.atom.builder +++ b/app/views/tweets/user_discoveries.atom.builder diff --git a/app/views/tweets/discoveries.html.haml b/app/views/tweets/user_discoveries.html.haml index bebf34a..bebf34a 100644 --- a/app/views/tweets/discoveries.html.haml +++ b/app/views/tweets/user_discoveries.html.haml diff --git a/app/views/tweets/favorites.html.haml b/app/views/tweets/user_favorites.html.haml index bebf34a..bebf34a 100644 --- a/app/views/tweets/favorites.html.haml +++ b/app/views/tweets/user_favorites.html.haml diff --git a/app/views/tweets/recent.html.haml b/app/views/tweets/user_recent.html.haml index 46d6d34..46d6d34 100644 --- a/app/views/tweets/recent.html.haml +++ b/app/views/tweets/user_recent.html.haml diff --git a/app/views/tweets/retweets.html.haml b/app/views/tweets/user_retweets.html.haml index bebf34a..bebf34a 100644 --- a/app/views/tweets/retweets.html.haml +++ b/app/views/tweets/user_retweets.html.haml diff --git a/app/views/tweets/timeline.atom.builder b/app/views/tweets/user_timeline.atom.builder index ca1ad59..ca1ad59 100644 --- a/app/views/tweets/timeline.atom.builder +++ b/app/views/tweets/user_timeline.atom.builder diff --git a/app/views/tweets/timeline.html.haml b/app/views/tweets/user_timeline.html.haml index 17e385a..17e385a 100644 --- a/app/views/tweets/timeline.html.haml +++ b/app/views/tweets/user_timeline.html.haml |