17 lines
433 B
Ruby
17 lines
433 B
Ruby
|
class TargetedUserLinksController < ApplicationController
|
||
|
before_action :set_targeted_user_link, only: [:show]
|
||
|
def show
|
||
|
if @targeted_user_link.invalid_signed_in_user?(current_user)
|
||
|
render
|
||
|
else
|
||
|
redirect_to @targeted_user_link.redirect_url(Rails.application.routes.url_helpers)
|
||
|
end
|
||
|
end
|
||
|
|
||
|
private
|
||
|
|
||
|
def set_targeted_user_link
|
||
|
@targeted_user_link = TargetedUserLink.find_by(id: params[:id])
|
||
|
end
|
||
|
end
|