Sha256: 5156016c7dd7fae551f806238c503e2fd422b5ccde1f6645c93982062f07de8e
Contents?: true
Size: 1.08 KB
Versions: 1
Compression:
Stored size: 1.08 KB
Contents
# TODO determine how this relates to Fe::ReferencesController and if we can delete one of the two class Fe::ReferenceSheetsController < Fe::AnswerSheetsController skip_before_filter :ssm_login_required, :login before_filter :edit_only, :except => [:edit] def edit @reference_sheet = @answer_sheet unless @answer_sheet render :not_found and return end @answer_sheet.start! if @answer_sheet.created? # Set up question_sheet if needed if @answer_sheet.question_sheets.empty? @answer_sheet.question_sheets << Fe::QuestionSheet.find(@answer_sheet.question.related_question_sheet) end @presenter = Fe::AnswerPagesPresenter.new(self, @answer_sheet, params[:a]) @elements = @presenter.questions_for_page(:first).elements @page = @presenter.pages.first render 'fe/answer_sheets/edit', layout: 'fe/application' end protected def get_answer_sheet @answer_sheet ||= Fe::ReferenceSheet.find_by_id_and_access_key(params[:id], params[:a]) return false unless @answer_sheet end def edit_only return false end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
fe-1.0.0 | app/controllers/fe/reference_sheets_controller.rb |