Sha256: a7ec0135ef42234790393fd2e8bfe21a2a1655e01e1a3686dacd780b233ac9b5

Contents?: true

Size: 316 Bytes

Versions: 1

Compression:

Stored size: 316 Bytes

Contents

module HyperAdmin
  class ApplicationController < ActionController::Base
    before_action :load_all_resource_classes

    protected

    def load_all_resource_classes
      collection = ::HyperAdmin.application.resources
      @resource_classes = collection.resources.values.map(&:resource_class)
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
hyper_admin-0.2.0 app/controllers/hyper_admin/application_controller.rb