Class: ActiveAdmin::Views::Scopes
Overview
Renders a collection of ActiveAdmin::Scope objects as a simple list with a seperator
Instance Method Summary
collapse
#collection_is_empty?, #collection_size
Instance Method Details
#build(scopes, options = {}) ⇒ Object
24
25
26
27
28
29
30
31
32
33
34
|
# File 'lib/active_admin/views/components/scopes.rb', line 24
def build(scopes, options = {})
scopes.group_by(&:group).each do |group, group_scopes|
ul class: "table_tools_segmented_control #{group_class(group)}" do
group_scopes.each do |scope|
build_scope(scope, options) if call_method_or_exec_proc(scope.display_if_block)
end
nil
end
end
end
|
#default_class_name ⇒ Object
16
17
18
|
# File 'lib/active_admin/views/components/scopes.rb', line 16
def default_class_name
"scopes"
end
|
#tag_name ⇒ Object
20
21
22
|
# File 'lib/active_admin/views/components/scopes.rb', line 20
def tag_name
"div"
end
|