aboutsummaryrefslogtreecommitdiffstats
path: root/app/controllers/tweets_controller.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/controllers/tweets_controller.rb')
-rw-r--r--app/controllers/tweets_controller.rb7
1 files changed, 6 insertions, 1 deletions
diff --git a/app/controllers/tweets_controller.rb b/app/controllers/tweets_controller.rb
index e372091..e8c9ed9 100644
--- a/app/controllers/tweets_controller.rb
+++ b/app/controllers/tweets_controller.rb
@@ -89,7 +89,7 @@ class TweetsController < ApplicationController
def render(*args)
if args.empty?
if params[:action] == "show"
- super "shared/tweet"
+ super
else
super "shared/tweets"
end
@@ -111,4 +111,9 @@ class TweetsController < ApplicationController
@user_b = _get_user(params[:user_id_b], params[:screen_name_b])
raise Aclog::Exceptions::UserNotFound unless @user_b
end
+
+ def tweet_required
+ @tweet = Tweet.find_by(id: params[:id])
+ raise Aclog::Exceptions::TweetNotFound unless @tweet
+ end
end