Created
November 24, 2014 19:29
-
-
Save torsday/8a6e0fc188fb72ee3128 to your computer and use it in GitHub Desktop.
tci_82865566.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Shared::AnswersController < ApplicationController | |
before_filter :authenticate_student_or_teacher! | |
def create | |
@lesson = Lesson.where(id: params[:lesson_id]).first | |
authorize! :read, @lesson | |
@challenge = @lesson.challenge | |
@challenge_result = current_student ? @challenge.result_for_student(current_student) : @challenge.result_for_staffer(current_staffer) | |
@max_num_attempts = false | |
challenge_answer(params[:question_id], params[:answer_id]) | |
respond_to do |format| | |
format.js | |
format.html | |
end | |
end |
Of the two places the @answer_path
(defined as shared_program_lesson_challenge_answers_path(@program, @lesson)
) are used, both use :remote => true
.
Sounds like it could be an assets thing.
Checked the source code of view-source:http://demo.teachtci.com/shared/programs/156/lessons/1474/challenge
, all the remote's properly show up within their tags as true
.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I added line 14's
format.html
in an attempt to remedy theUnknownFormat
error seen in new relic, under the assumption is that it's unintentionally looking for the defaulthtml
response. If this fixes it, the deeper issue, per this SO article implies we're likely calling for anhtml
response other thanjs
. If it doesn't fix it, it likely means we're calling for a different response (perhapsjson
). Either way, my question is... How best to track down where this is getting called?app/views/shared/answers/_attempt.js.erb
is where I'm looking, but nothing stands out as an improper request.