app/helpers/tramway/admin/application_helper.rb in tramway-admin-1.12.0.1 vs app/helpers/tramway/admin/application_helper.rb in tramway-admin-1.12.0.2

- old
+ new

@@ -11,10 +11,15 @@ include ::Tramway::Admin::InputsHelper include ::Tramway::Admin::FocusGeneratorHelper include ::Tramway::Collections::Helper def object_type(object) - ::Tramway::Admin.available_models_for(@application_engine || @application.name).map(&:to_s).include?(object.class.name) ? :record : :singleton + object_class_name = if object.class.ancestors.include? ::Tramway::Core::ApplicationDecorator + object.class.model_class.name + else + object.class.name + end + ::Tramway::Admin.available_models_for(@application_engine || @application.name).map(&:to_s).include?(object_class_name) ? :record : :singleton end end end end