Commit 5750786d authored by mgabdev's avatar mgabdev

Removed bang operator from account, tag finders in home_controller

If account or tag does not exist, it tosses an error. without bang it ignores if doesn't exist.
parent 1e6cf79f
......@@ -14,9 +14,9 @@ class HomeController < ApplicationController
def set_data_for_meta
if params[:username].present?
@account = Account.find_local!(params[:username])
@account = Account.find_local(params[:username])
elsif params[:account_username].present?
@account = Account.find_local!(params[:account_username])
@account = Account.find_local(params[:account_username])
if params[:id].present?
@status = @account.statuses.find(params[:id])
......@@ -26,7 +26,7 @@ class HomeController < ApplicationController
end
if request.path.starts_with?('/tags') && params[:tag].present?
@tag = Tag.find_normalized!(params[:tag])
@tag = Tag.find_normalized(params[:tag])
end
end
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment