ensure_domain 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/ensure_domain/version.rb +1 -1
- data/lib/ensure_domain.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 25b4063243441d8631d94a628aad5120d57c7574
|
4
|
+
data.tar.gz: 6135ccd0f1b4b3c6f1190e285b98837789d251da
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f92f7231dc0025a3bb2f1e5f35fe836b8ac75b87b375b324a5ec20d8cc1b9dad75d0ce6b864da5a041df13ad3faf7ac066ac1f33af30796a05f5646eae3238bf
|
7
|
+
data.tar.gz: 13da2170a5dfb032c1bd4bf5d06b5a50ccd854a88033e7126c18cba408d2276b170d6ef3ff183c6759e78cf053b96183756ddebb9ae210448dfab19316e08214
|
data/lib/ensure_domain.rb
CHANGED
@@ -11,7 +11,7 @@ module EnsureDomain
|
|
11
11
|
puts "WARNING: You must set config.action_mailer.default_url_options = { host: 'www.yourdomain.com' } in order to the 'ensure_domain' gem to work as intended"
|
12
12
|
elsif Rails.env.production? && request.host != default_url_options[:host]
|
13
13
|
querystring = "?#{request.query_string}" unless request.query_string.empty?
|
14
|
-
redirect_to "#{request.protocol}#{
|
14
|
+
redirect_to "#{request.protocol}#{default_url_options[:host]}#{request.path}#{querystring}", status: 301
|
15
15
|
end
|
16
16
|
end
|
17
17
|
end
|