Class: Alchemy::Admin::TrashController

Inherits:
BaseController show all
Defined in:
app/controllers/alchemy/admin/trash_controller.rb

Instance Method Summary collapse

Methods inherited from BaseController

#leave

Methods included from Modules

included, #module_definition_for, register_module

Methods included from Alchemy::AbilityHelper

#current_ability

Methods included from ConfigurationMethods

#configuration, #multi_language?, #multi_site?, #prefix_locale?

Instance Method Details

#clearObject



17
18
19
20
21
# File 'app/controllers/alchemy/admin/trash_controller.rb', line 17

def clear
  @page = Page.find(params[:page_id])
  @elements = Element.trashed
  @elements.map(&:destroy)
end

#indexObject



10
11
12
13
14
# File 'app/controllers/alchemy/admin/trash_controller.rb', line 10

def index
  @elements = Element.trashed.includes(*element_includes)
  @page = Page.find(params[:page_id])
  @allowed_elements = @page.available_element_definitions
end