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



14
15
16
17
18
# File 'app/controllers/alchemy/admin/trash_controller.rb', line 14

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

#indexObject



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

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