Sha256: ff25d315b3d37e8aa1e25329c41dbc92a53ce027ccb19e844c5641384b153551

Contents?: true

Size: 1.09 KB

Versions: 20

Compression:

Stored size: 1.09 KB

Contents

# frozen_string_literal: true

module Tramway
  module Admin
    module ApplicationHelper
      include ::FontAwesome5::Rails::IconHelper
      include AuthManagement
      include AdditionalButtonsBuilder
      include ::SmartButtons
      include CasesHelper
      include RussianCasesHelper
      include ::Tramway::Admin::RecordsHelper
      include ::Tramway::Admin::SingletonHelper
      include ::Tramway::Admin::NavbarHelper
      include ::Tramway::Admin::InputsHelper
      include ::Tramway::Admin::FocusGeneratorHelper
      include ::Tramway::Collections::Helper
      include ::Tramway::Core::CopyToClipboardHelper

      def object_type(object)
        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

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
tramway-admin-1.26.1.3 app/helpers/tramway/admin/application_helper.rb
tramway-admin-1.26.1.2 app/helpers/tramway/admin/application_helper.rb
tramway-admin-1.26.1.1 app/helpers/tramway/admin/application_helper.rb
tramway-admin-1.26.1 app/helpers/tramway/admin/application_helper.rb
tramway-admin-1.26 app/helpers/tramway/admin/application_helper.rb
tramway-admin-1.25 app/helpers/tramway/admin/application_helper.rb
tramway-admin-1.24.0.3 app/helpers/tramway/admin/application_helper.rb
tramway-admin-1.24.0.2 app/helpers/tramway/admin/application_helper.rb
tramway-admin-1.24.0.1 app/helpers/tramway/admin/application_helper.rb
tramway-admin-1.24 app/helpers/tramway/admin/application_helper.rb
tramway-admin-1.23.0.3 app/helpers/tramway/admin/application_helper.rb
tramway-admin-1.23.0.2 app/helpers/tramway/admin/application_helper.rb
tramway-admin-1.23.0.1 app/helpers/tramway/admin/application_helper.rb
tramway-admin-1.23 app/helpers/tramway/admin/application_helper.rb
tramway-admin-1.22.0.4 app/helpers/tramway/admin/application_helper.rb
tramway-admin-1.22.0.3 app/helpers/tramway/admin/application_helper.rb
tramway-admin-1.22.0.2 app/helpers/tramway/admin/application_helper.rb
tramway-admin-1.22.0.1 app/helpers/tramway/admin/application_helper.rb
tramway-admin-1.22 app/helpers/tramway/admin/application_helper.rb
tramway-admin-1.21.2 app/helpers/tramway/admin/application_helper.rb