tramway-admin 1.12.0.1 → 1.12.0.2

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: 9eae42074a988ca816a21d71c0f9c6d3ac0b46f31399f6da7091fbfd408f7f17
4
- data.tar.gz: c56b19d4085c23245827bba64e7e56f62074b6d2a42e51d329bd37f08b4c206f
3
+ metadata.gz: 6390ac592f21aebf8333792614e46caf67ddcddca27e12c4bfba8d39199d0a00
4
+ data.tar.gz: d15839db6184ccb6d76720ad3776840008e6bc6f72a2a098eaa7cfc78e85ad1f
5
5
  SHA512:
6
- metadata.gz: 998547d17902ac7ac720647bab7b53eb382a30df2e375d6b77febbe9742a0feafe51fa7f914d520f80cda0db12e72da2d390d11ee2eca903fd7750abb684275d
7
- data.tar.gz: 21d83f7463ea824b958c3ea8f8efb9813cc6134bd6380999d79128833e4557c63aa2ac1ff4668800e22011e033cb74b9240343fb4258af79f1a4eedd29105339
6
+ metadata.gz: f5eee3e357442064504a8dace22a13bc4f30db55aef66915af687bfc31ffc411eb161268d8633b64865433253d7f6fe9e25cce5da73ef047208c9f3597ef288d
7
+ data.tar.gz: 3dd13550973889044ae5740116a8e252f5eb99eeb966d4d28526cb201fdb29e6958ebe4a065e2951da57aca0314f7c35254fe296aff81855119beec151aa31f6
@@ -13,7 +13,12 @@ module Tramway
13
13
  include ::Tramway::Collections::Helper
14
14
 
15
15
  def object_type(object)
16
- ::Tramway::Admin.available_models_for(@application_engine || @application.name).map(&:to_s).include?(object.class.name) ? :record : :singleton
16
+ object_class_name = if object.class.ancestors.include? ::Tramway::Core::ApplicationDecorator
17
+ object.class.model_class.name
18
+ else
19
+ object.class.name
20
+ end
21
+ ::Tramway::Admin.available_models_for(@application_engine || @application.name).map(&:to_s).include?(object_class_name) ? :record : :singleton
17
22
  end
18
23
  end
19
24
  end
@@ -1,5 +1,5 @@
1
1
  module Tramway
2
2
  module Admin
3
- VERSION = '1.12.0.1'
3
+ VERSION = '1.12.0.2'
4
4
  end
5
5
  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.12.0.1
4
+ version: 1.12.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pavel Kalashnikov