Class: Redpen::ResolutionsController

Inherits:
ApplicationController show all
Defined in:
app/controllers/redpen/resolutions_controller.rb

Overview

Resolving a note is a noun with a lifecycle, not a verb on the note: create resolves, destroy reopens. A host's agent calls the same model verb.

Instance Method Summary collapse

Methods included from HostRouteHelpers

define_from

Instance Method Details

#create ⇒ Object



5
6
7
8
# File 'app/controllers/redpen/resolutions_controller.rb', line 5

def create
  note.resolve(params[:resolution])
  redirect_to notes_path(path: path), status: :see_other
end

#destroy ⇒ Object



10
11
12
13
# File 'app/controllers/redpen/resolutions_controller.rb', line 10

def destroy
  note.reopen
  redirect_to notes_path(path: path), status: :see_other
end