tml 5.5.2 → 5.5.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/tml/application.rb +5 -0
- data/lib/tml/version.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: e4de2f5184318d3d0719cfe5de0495ab6e91e9f1
|
4
|
+
data.tar.gz: bf574f2c89a6a5d7b4da3c5e2e54eaa4fe0af6b1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c81dca25c0ca6304bf7f3a21eca7fba9c27715e47426d21e66bb4a06b5b8794825fe1d931ff29e0763f132374870675af24569702639244381fbe4bac2afe34f
|
7
|
+
data.tar.gz: 3f6dfccc814f762f526759a5291090e02bef34a86d8f47401d5ffbbcedfc7963d7f23d847d6731992c158798894c67559facf5d1dc25d113d161b98e963e70ba
|
data/lib/tml/application.rb
CHANGED
@@ -142,6 +142,11 @@ class Tml::Application < Tml::Base
|
|
142
142
|
@locales ||= languages.collect{|lang| lang.locale}
|
143
143
|
end
|
144
144
|
|
145
|
+
# Application or configuration default locale
|
146
|
+
def default_locale
|
147
|
+
self.attributes[:default_locale] || Tml.config.default_locale
|
148
|
+
end
|
149
|
+
|
145
150
|
# Returns supported locale or fallback locale
|
146
151
|
def supported_locale(locale)
|
147
152
|
return default_locale if locale.to_s == ''
|
data/lib/tml/version.rb
CHANGED