Class: ArchivesController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- ArchivesController
- Defined in:
- app/controllers/archives_controller.rb
Instance Method Summary collapse
Instance Method Details
#create ⇒ Object
6 7 8 9 10 11 12 |
# File 'app/controllers/archives_controller.rb', line 6 def create @project = current_project @project.archived = true @project.save flash[:success] = "Project has been archived" redirect_to account_projects_url(current_project.account) end |
#destroy ⇒ Object
14 15 16 17 18 19 20 |
# File 'app/controllers/archives_controller.rb', line 14 def destroy @project = current_project @project.archived = false @project.save flash[:success] = "Project unarchived" redirect_to account_projects_url(current_project.account) end |