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



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

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