AbstractController::DoubleRenderError in Searches::LocationsController#index

Render and/or redirect were called multiple times in this action. Please note that you may only call render OR redirect, and at most once per action. Also note that neither redirect nor render terminate execution of the action, so if you want to exit an action after redirecting, you need to do something like "redirect_to(...) and return".

Extracted source (around line #35):
33
34
35
36
37
38
              
if city.name!='' && city.slug!=params[:id] && ((city.slug.include? params[:id]) || (params[:id].include? city.slug))
#puts "redirect 3".bold.red
redirect_to search_location_path(params[:profession_id],city.slug), :status => 301 # CITY FIND'IT
return
elsif city.name!='' && city.slug!=params[:id] && department.name!='' && department.slug!=params[:id] && ((department.slug.include? params[:id]) || (params[:id].include? department.slug))
#puts "redirect 4".bold.red

Rails.root: /var/www/therapeutes.com/releases/20240326114116

Application Trace | Framework Trace | Full Trace

Request

Parameters:

{"profession_id"=>"hypnose",
 "id"=>"seillons-source-d-argens-83470"}

Response

Headers:

None