Sha256: 58940ca197e362bdff0da5356a07fb15745fe22c29caa2866d1aff5a658c2743
Contents?: true
Size: 715 Bytes
Versions: 12
Compression:
Stored size: 715 Bytes
Contents
module Typus module Controller module Ancestry def index items = [] @resource.roots.each do |item| items << item if item.has_children? item.children.each do |child| items << child if child.has_children? child.children.each do |child| items << child end end end end end @items = Kaminari.paginate_array(items).page(params[:page]).per(1000) set_default_action add_resource_action("Trash", {:action => "destroy"}, {:confirm => "#{Typus::I18n.t("Trash")}?", :method => 'delete'}) end end end end
Version data entries
12 entries across 12 versions & 1 rubygems