rails-settings-cached 2.3.2 → 2.3.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/rails-settings/base.rb +5 -1
- data/lib/rails-settings/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d9fb44e09bad24a4d3c6cf36fda107fe18ce214964b713de318e5f3efc083851
|
4
|
+
data.tar.gz: 75ee5df473cff1fc07b963b6441152f559de8d0a5652267530c5c0f62cac93f9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6bf0b841b4b2ee46b7da5f51a54d2e3f17f984f2fe1f72841bc056966efc29fd5ad70ea54b0b5559f4ea493927ef796cbc956302b404e18ec61059c40d620904
|
7
|
+
data.tar.gz: 76a594a2df28a1490c6d67b1fff1a4d776572cc1240c9c07549d6d0349c048a017ee10f828d7c38e41bdf4c7158af9108f9c9181af3ee015af72654cd23831ff
|
data/lib/rails-settings/base.rb
CHANGED
@@ -142,7 +142,11 @@ module RailsSettings
|
|
142
142
|
end
|
143
143
|
|
144
144
|
def _value_of(var_name)
|
145
|
-
|
145
|
+
unless table_exists?
|
146
|
+
# Fallback to default value if table was not ready (before migrate)
|
147
|
+
puts "WARNING: table: \"#{table_name}\" does not exist, `#{name}.#{var_name}` fallback to returns the default value."
|
148
|
+
return nil
|
149
|
+
end
|
146
150
|
|
147
151
|
_all_settings[var_name.to_s]
|
148
152
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rails-settings-cached
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.3.
|
4
|
+
version: 2.3.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jason Lee
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-10-
|
11
|
+
date: 2020-10-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|