Class: ActiveadminAncestryView::ShowActionBuilder
- Inherits:
-
ActionBuilder
- Object
- ActionBuilder
- ActiveadminAncestryView::ShowActionBuilder
- Defined in:
- lib/activeadmin_ancestry_view/action_builder/show_action_builder.rb
Constant Summary
Constants inherited from ActionBuilder
ActionBuilder::DEFAULT_OPTIONS
Instance Method Summary collapse
Instance Method Details
#call(opt = {}, &block) ⇒ Object
3 4 5 6 7 8 9 10 11 |
# File 'lib/activeadmin_ancestry_view/action_builder/show_action_builder.rb', line 3 def call(opt = {}, &block) %{show do #{block.call if block_given?} sorted_subtree = resource.subtree.sort_by(&:full_ancestry) sorted_subtree.each do |res| #{render_partial(opt)} end end} end |