Module: ActiveAdmin::ViewHelpers::ScopeNameHelper

Included in:
ActiveAdmin::ViewHelpers
Defined in:
lib/active_admin/view_helpers/scope_name_helper.rb

Instance Method Summary collapse

Instance Method Details

#scope_name(scope) ⇒ Object


5
6
7
8
9
10
11
12
# File 'lib/active_admin/view_helpers/scope_name_helper.rb', line 5

def scope_name(scope)
  case scope.name
  when Proc then
    self.instance_exec(&scope.name).to_s
  else
    scope.name.to_s
  end
end