Browse Source

Fixed redirection i18n redirection on preview

development
Godwin 9 years ago
parent
commit
2b4532c066
  1. 4
      app/controllers/application_controller.rb
  2. 1
      config/environments/preview.rb

4
app/controllers/application_controller.rb

@ -213,9 +213,7 @@ class ApplicationController < LinguaFrancaApplicationController
expiry ||= (Time.now + 12.hours)
session[:confirm_uid] = user.id
UserMailer.send_mail :email_confirmation do
{
:args => EmailConfirmation.create(user_id: user.id, expiry: expiry, url: url)
}
EmailConfirmation.create(user_id: user.id, expiry: expiry, url: url)
end
end

1
config/environments/preview.rb

@ -101,4 +101,5 @@ BikeBike::Application.configure do
I18n.config.language_detection_method = I18n::Config::DETECT_LANGUAGE_FROM_SUBDOMAIN
I18n.config.subdomain_format = 'preview-%'
I18n.config.host_locale_regex = /^preview\-([a-z]{2})\.[^\.]+\..*$/
end

Loading…
Cancel
Save