Sha256: 8820045c6daeba88c17390a327188ddbd51d3306ded67c8c6dcb9551af286e44
Contents?: true
Size: 682 Bytes
Versions: 27
Compression:
Stored size: 682 Bytes
Contents
module Alchemy module Admin class TrashController < Alchemy::Admin::BaseController helper "alchemy/admin/elements" authorize_resource class: false def index @elements = Element.trashed @page = Page.find(params[:page_id]) @allowed_elements = @page.available_element_definitions @draggable_trash_items = {} @elements.each do |element| @draggable_trash_items["element_#{element.id}"] = element.available_page_cell_names(@page) end end def clear @page = Page.find(params[:page_id]) @elements = Element.trashed @elements.map(&:destroy) end end end end
Version data entries
27 entries across 27 versions & 2 rubygems