Method: ActiveAdmin::Comment.resource_type

Defined in:
lib/active_admin/orm/active_record/comments/comment.rb

.resource_type(resource) ⇒ String

Returns The name of the record to use for the polymorphic relationship.

Returns:

  • (String)

    The name of the record to use for the polymorphic relationship



15
16
17
# File 'lib/active_admin/orm/active_record/comments/comment.rb', line 15

def self.resource_type(resource)
  ResourceController::Decorators.undecorate(resource).class.base_class.name.to_s
end