only redirect on html requests
This commit is contained in:
parent
7346921473
commit
2cbf383fbb
1 changed files with 2 additions and 1 deletions
|
|
@ -82,11 +82,12 @@ class PeopleController < ApplicationController
|
|||
def show
|
||||
@person = Person.find_from_guid_or_username(params)
|
||||
flag = FeatureFlagger.new(current_user)
|
||||
logger.info(request.format)
|
||||
|
||||
raise(ActiveRecord::RecordNotFound) if remote_profile_with_no_user_session?
|
||||
return redirect_to :back, :notice => t("people.show.closed_account") if @person.closed_account?
|
||||
return redirect_to person_path(@person) if params[:ex] && !flag.new_profile?
|
||||
return redirect_to person_path(@person, :ex => true) if !params[:ex] && flag.new_profile? && flag.new_hotness?
|
||||
return redirect_to person_path(@person, :ex => true) if !params[:ex] && flag.new_profile? && flag.new_hotness? && request.format == "text/html"
|
||||
|
||||
@post_type = :all
|
||||
@aspect = :profile
|
||||
|
|
|
|||
Loading…
Reference in a new issue