How to avoid this double render issue, i have been trying to replicate but couldn't. So is there any issue with this below code?
def check_count
assign_values_from_params
if count >= failed_count
render partial: params[:view_name], layout: false and return
else
render text: 'works' and return
end
end
def assign_values_from_params
# code
# code
# code
if @date.blank?
redirect_to main_index_path and return
end
if @counted_obj != 5
# call one function
end
end
Also should i try something this way Double render error rails ?