tramway-admin 1.32.2 → 1.32.2.1

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
  SHA256:
3
- metadata.gz: f29f2296ff326aa4bcdeb569ba6f9c0e8f9afd9a307b53d9c79860bf1a98b9ea
4
- data.tar.gz: cfb493f04f4240ff6234c2a94d927c5a5f8e8a8b458e7204d4d814bcd00b2ea1
3
+ metadata.gz: f07d5b960569e1726907cbb62257174c49b3bbfcd56e3343b7bed2426a17bf5a
4
+ data.tar.gz: 5003ac7d1adec8c28af7413a2669ad305ca3b47b0a9cc8fd9c5b350da8ae2a81
5
5
  SHA512:
6
- metadata.gz: b8bb82d5139135bbbf8608105d3ba4bcf3a75ad53a24ac653e76f7bcbad62f683fcadf5a86d0f350fb9a6e20fe545751f8cfbd46dbfd2039a82bb778a3fb8724
7
- data.tar.gz: 7515b06e5c9534eb2c6099b32287b0e6e3ea2efd232af314eccb29b59a1c55907585c29281624fbd9a275ae381542406add206af599103cfc4b0b2287f48be89
6
+ metadata.gz: 864d6c1ee5998c3d90942bf7511c06d82a6f513900682e9c4a354895b92735a828e4ac0d65304b284c237db5e6edbea4c7658469a1111be3889c5b1fa4bc4332
7
+ data.tar.gz: cfce672ff7fd8fb5aaa0952040de2d7513e7216fc241c5795be142cfe8dab542857fd59f63ba7ba91b1f06915b91ae764c996d309f7851906a0af827eda86ef5
@@ -92,7 +92,12 @@ module Tramway
92
92
  end
93
93
 
94
94
  def admin_form_class
95
- "::#{current_admin.role.camelize}::#{model_class}Form".constantize
95
+ class_name = "::#{current_admin.role.camelize}::#{model_class}Form"
96
+ if defined? class_name
97
+ class_name.constantize
98
+ else
99
+ raise "Tramway::Admin - you should create form for role `#{current_admin.role}` to edit #{model_class} model. It should be named #{class_name}"
100
+ end
96
101
  end
97
102
 
98
103
  def model_given?
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Tramway
4
4
  module Admin
5
- VERSION = '1.32.2'
5
+ VERSION = '1.32.2.1'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tramway-admin
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.32.2
4
+ version: 1.32.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pavel Kalashnikov