Class: Administrate::CustomDashboard

Inherits:
Object
  • Object
show all
Includes:
Administrate
Defined in:
lib/administrate/custom_dashboard.rb

Constant Summary

Constants included from Administrate

VERSION

Class Method Summary collapse

Methods included from Administrate

deprecator, warn_of_deprecated_authorization_method, warn_of_deprecated_method, warn_of_deprecated_option, warn_of_missing_resource_class

Class Method Details

.resource(resource_name) ⇒ Object



10
11
12
# File 'lib/administrate/custom_dashboard.rb', line 10

def resource(resource_name)
  define_singleton_method(:named_resource) { resource_name }
end

.resource_name(_opts) ⇒ Object



6
7
8
# File 'lib/administrate/custom_dashboard.rb', line 6

def resource_name(_opts)
  named_resource.pluralize.titleize
end