rails_email_preview 0.2.19 → 0.2.20

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c319840862f0f4e955aacdfa551947d2990f0238
4
- data.tar.gz: 3b161319c6363cc5ba812d6d787bc4f52aa0307a
3
+ metadata.gz: dbaf4be7a442f4bfe3b88dee868d30e5734d5eea
4
+ data.tar.gz: 5aa58ac87f863b6c4fda28917a998ad609068e7d
5
5
  SHA512:
6
- metadata.gz: f3c66fc3abfb96c877c36006f7f93da515f2ba0bd303ea32e60dfdda76c32a951aeb1c6fccc3b1dd280bd2ae014d0a7ac4758d448fc22a63476080149458d407
7
- data.tar.gz: 90d75d1e26ec2b8844f26e8cf297fc8a7a1b674f01141bd92ab92fa627e17fff937720c576c6771858fba85799addd9cb6993f871f6c32a0bd320894c175285b
6
+ metadata.gz: 22eef373270fd2974c41974b8c2838219001f44c92f31445670537ae0e80af14a025713d3512959e586bd3b3f5094717cda2453eafd6f84d777e2f83a4742665
7
+ data.tar.gz: 7ae5581b11e36e3af9ebf3557f92beb0b32e0418a9809bb9b40e085f69060d08aeee577ed763999b1259540f1e6cb60eee5849d8ed2e20610be5b7cb053b384f
@@ -81,7 +81,10 @@ class RailsEmailPreview::EmailsController < ::RailsEmailPreview::ApplicationCont
81
81
  end
82
82
 
83
83
  def set_locale
84
- config_locale = RailsEmailPreview.locale || :en
84
+ config_locale = RailsEmailPreview.locale
85
+ if !I18n.available_locales.map(&:to_s).include?(config_locale.to_s)
86
+ config_locale = :en
87
+ end
85
88
  begin
86
89
  locale_was = I18n.locale
87
90
  I18n.locale = config_locale
@@ -1,3 +1,3 @@
1
1
  module RailsEmailPreview
2
- VERSION = '0.2.19'
2
+ VERSION = '0.2.20'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails_email_preview
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.19
4
+ version: 0.2.20
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gleb Mazovetskiy
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-03-13 00:00:00.000000000 Z
11
+ date: 2014-03-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails