rails_admin_settings 1.1.2 → 1.1.3
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2c76a7a81140fa4baee9e1db13602f538721af8d
|
4
|
+
data.tar.gz: 1dad9922dc2068e681ff5661996759aea13802b5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a4426f48c52e7fb3dcc74e141a5064a0e3932a58578482c8fa3258b98b0d6876f8b244bd13ab63c267f512f01cb91ba1fea5ba3fadf44133960a81fd540fbbf8
|
7
|
+
data.tar.gz: f5935ca8276eb71bd5514f6c239215271f3f556cc704af2edaffb4996b292d3a4a6240d68de6127d6206522facecf94e81fd2f6bb7a46308ec857dbc35bf5c04
|
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
@@ -60,10 +60,12 @@ module RailsAdminSettings
|
|
60
60
|
end
|
61
61
|
|
62
62
|
# t = {_all: 'Все'}
|
63
|
-
::
|
64
|
-
|
65
|
-
|
66
|
-
|
63
|
+
if ::Settings.table_exists?
|
64
|
+
::RailsAdminSettings::Setting.pluck(:ns).uniq.each do |c|
|
65
|
+
s = "ns_#{c.gsub('-', '_')}".to_sym
|
66
|
+
scope s, -> { where(ns: c) }
|
67
|
+
# t[s] = c
|
68
|
+
end
|
67
69
|
end
|
68
70
|
# I18n.backend.store_translations(:ru, {admin: {scopes: {'rails_admin_settings/setting': t}}})
|
69
71
|
|
@@ -25,8 +25,10 @@ module RailsAdminSettings
|
|
25
25
|
end
|
26
26
|
end
|
27
27
|
end
|
28
|
-
|
29
|
-
|
28
|
+
if ::Settings.table_exists?
|
29
|
+
nss = ::RailsAdminSettings::Setting.pluck(:ns).uniq.map { |c| "ns_#{c.gsub('-', '_')}".to_sym }
|
30
|
+
scopes([nil] + nss)
|
31
|
+
end
|
30
32
|
end
|
31
33
|
|
32
34
|
edit do
|