Class: ArchivesController

Inherits:
ApplicationController
  • Object
show all
Defined in:
app/controllers/archives_controller.rb

Instance Method Summary collapse

Instance Method Details

#createObject



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 (current_project.)
end

#destroyObject



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 (current_project.)
end