rails_admin_settings 1.1.2 → 1.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: eb8a82776828edcae4754e00c8a2d7784277f2a9
4
- data.tar.gz: c791f863ecd37dd5b5acaf08f03f1f6033d03d5e
3
+ metadata.gz: 2c76a7a81140fa4baee9e1db13602f538721af8d
4
+ data.tar.gz: 1dad9922dc2068e681ff5661996759aea13802b5
5
5
  SHA512:
6
- metadata.gz: a934c7c8621a822943165858158ba2fd0587e599aabe4833cd103082307f208edfb7aff16c10cac9a9443bca7386b34415a719c6af57740ead90a176d0f6e92f
7
- data.tar.gz: 8478ac74537fa997bd0a2d34f46bd766a4e044eabdfba2ff1be3d4af8f4e2ec2808b009bee3daa55c95da07831f475bf40081c86486031e9f294e9c8627ceaa2
6
+ metadata.gz: a4426f48c52e7fb3dcc74e141a5064a0e3932a58578482c8fa3258b98b0d6876f8b244bd13ab63c267f512f01cb91ba1fea5ba3fadf44133960a81fd540fbbf8
7
+ data.tar.gz: f5935ca8276eb71bd5514f6c239215271f3f556cc704af2edaffb4996b292d3a4a6240d68de6127d6206522facecf94e81fd2f6bb7a46308ec857dbc35bf5c04
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## 1.1.3
2
+
3
+ - Fix for namespace tabs when database table does not exist yet.
4
+
1
5
  ## 1.1.2
2
6
 
3
7
  - Add namespace tabs in rails_admin
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- rails_admin_settings (1.1.2)
4
+ rails_admin_settings (1.1.3)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -60,10 +60,12 @@ module RailsAdminSettings
60
60
  end
61
61
 
62
62
  # t = {_all: 'Все'}
63
- ::RailsAdminSettings::Setting.pluck(:ns).uniq.each do |c|
64
- s = "ns_#{c.gsub('-', '_')}".to_sym
65
- scope s, -> { where(ns: c) }
66
- # t[s] = c
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
- nss = ::RailsAdminSettings::Setting.pluck(:ns).uniq.map { |c| "ns_#{c.gsub('-', '_')}".to_sym }
29
- scopes([nil] + nss)
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
@@ -1,3 +1,3 @@
1
1
  module RailsAdminSettings
2
- VERSION = "1.1.2"
2
+ VERSION = "1.1.3"
3
3
  end
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: 1.1.2
4
+ version: 1.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gleb Tv