rails_admin_settings 0.3.1 → 0.3.2
Sign up to get free protection for your applications and to get access to all the features.
@@ -1,18 +1,26 @@
|
|
1
1
|
class Settings
|
2
2
|
class << self
|
3
3
|
def load!
|
4
|
-
|
4
|
+
if @@loaded
|
5
|
+
false
|
6
|
+
else
|
5
7
|
@@settings = {}
|
6
8
|
RailsAdminSettings::Setting.all.each do |setting|
|
7
9
|
@@settings[setting.key] = setting
|
8
10
|
end
|
9
11
|
@@loaded = true
|
12
|
+
true
|
10
13
|
end
|
11
14
|
end
|
12
15
|
|
13
16
|
def unload!
|
14
|
-
@@
|
15
|
-
|
17
|
+
if @@loaded
|
18
|
+
@@settings = {}
|
19
|
+
@@loaded = false
|
20
|
+
true
|
21
|
+
else
|
22
|
+
false
|
23
|
+
end
|
16
24
|
end
|
17
25
|
|
18
26
|
# returns processed setting value
|
@@ -28,7 +28,7 @@ module RailsAdminSettings
|
|
28
28
|
end
|
29
29
|
|
30
30
|
if Object.const_defined?('Geocoder')
|
31
|
-
base.field(:coordinates, type: Array)
|
31
|
+
base.field(:coordinates, type: Array, default: [])
|
32
32
|
base.send(:include, Geocoder::Model::Mongoid)
|
33
33
|
base.geocoded_by(:raw)
|
34
34
|
base.after_validation(:geocode, if: :address_type?)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rails_admin_settings
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -239,7 +239,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
239
239
|
version: '0'
|
240
240
|
segments:
|
241
241
|
- 0
|
242
|
-
hash:
|
242
|
+
hash: 326314329284691836
|
243
243
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
244
244
|
none: false
|
245
245
|
requirements:
|
@@ -248,7 +248,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
248
248
|
version: '0'
|
249
249
|
segments:
|
250
250
|
- 0
|
251
|
-
hash:
|
251
|
+
hash: 326314329284691836
|
252
252
|
requirements: []
|
253
253
|
rubyforge_project:
|
254
254
|
rubygems_version: 1.8.25
|