Class: MetadataPresenter::SubmissionsController

Inherits:
EngineController show all
Defined in:
app/controllers/metadata_presenter/submissions_controller.rb

Instance Method Summary collapse

Methods inherited from EngineController

#answered?, #back_link

Instance Method Details

#createObject



3
4
5
6
7
8
9
10
11
12
# File 'app/controllers/metadata_presenter/submissions_controller.rb', line 3

def create
  @page = service.confirmation_page

  if @page
    create_submission
    redirect_to_page @page.url
  else
    not_found
  end
end

#create_submissionObject



14
15
16
17
18
19
20
21
22
23
# File 'app/controllers/metadata_presenter/submissions_controller.rb', line 14

def create_submission
  # The runner is the only app that sends the submission.
  # and it is not needed on the editor app (editing & previewing).
  # So in the Runner we defined the #create_submission in the parent
  # controller and in the Editor we don't.
  #
  if defined?(super)
    super
  end
end