Class: Course::Assessment::Submission::Answer::Scribing::ScribblesController

Inherits:
Controller
  • Object
show all
Defined in:
app/controllers/course/assessment/submission/answer/scribing/scribbles_controller.rb

Instance Method Summary collapse

Instance Method Details

#createObject


7
8
9
10
11
12
13
14
15
16
17
18
# File 'app/controllers/course/assessment/submission/answer/scribing/scribbles_controller.rb', line 7

def create
  if @scribble
    @scribble.update_attributes(scribble_params)
  else
    @scribble = Course::Assessment::Answer::ScribingScribble.new(scribble_params)
    @scribble.save
  end

  respond_to do |format|
    format.json { render json: @scribing_answer }
  end
end