class ActiveadminAncestryView::ActionBuilder

Constants

DEFAULT_OPTIONS

Public Instance Methods

call(opt = {}, &block) click to toggle source
# File lib/activeadmin_ancestry_view/action_builder/action_builder.rb, line 11
def call(opt = {}, &block)
end

Private Instance Methods

render_partial(opt) click to toggle source
# File lib/activeadmin_ancestry_view/action_builder/action_builder.rb, line 16
def render_partial(opt)
  %{render partial: '#{template_path}', 
      locals: {
        resource: res,
        headers: #{opt[:headers] || DEFAULT_OPTIONS[:headers]}, 
        table: #{opt[:table] || DEFAULT_OPTIONS[:table] },
        no_color: #{opt[:no_color] || DEFAULT_OPTIONS[:no_color] },
        no_childless_link: #{opt[:no_childless_link] || DEFAULT_OPTIONS[:no_childless_link]},
        shift_depth: #{opt[:shift_depth] || DEFAULT_OPTIONS[:shift] }
      }
    }
end
template_path() click to toggle source
# File lib/activeadmin_ancestry_view/action_builder/action_builder.rb, line 29
def template_path
  'activeadmin_ancestry_view/main'
end