Class: Adm::ProjectsController

Inherits:
BaseController
  • Object
show all
Defined in:
app/controllers/adm/projects_controller.rb

Instance Method Summary collapse

Instance Method Details

#collectionObject



29
30
31
# File 'app/controllers/adm/projects_controller.rb', line 29

def collection
  @projects = apply_scopes(end_of_association_chain).not_deleted_projects.page(params[:page])
end

#destroyObject



20
21
22
23
24
25
26
27
# File 'app/controllers/adm/projects_controller.rb', line 20

def destroy
  @project = Project.find params[:id]
  if @project.can_push_to_trash?
    @project.push_to_trash!
  end

  redirect_to adm_projects_path
end