Browse Source

Fix for empty referrer in production

development
Godwin 8 years ago
parent
commit
2c5351389d
  1. 2
      app/controllers/application_controller.rb

2
app/controllers/application_controller.rb

@ -338,7 +338,7 @@ class ApplicationController < LinguaFrancaApplicationController
end end
# generate the confirmation, send the email and show the 403 # generate the confirmation, send the email and show the 403
referrer = params[:dest] || request.referer.gsub(/^.*?\/\/.*?\//, '/') referrer = params[:dest] || (request.present? && request.referer.present? ? request.referer.gsub(/^.*?\/\/.*?\//, '/') : settings_path)
generate_confirmation(params[:email], referrer) generate_confirmation(params[:email], referrer)
template = 'login_confirmation_sent' template = 'login_confirmation_sent'
@page_title ||= 'page_titles.403.Please_Check_Email' @page_title ||= 'page_titles.403.Please_Check_Email'

Loading…
Cancel
Save