.MD

Copy the markdown below:

NoMethodError

app/controllers/quiz/answers_controller.rb:38

undefined method 'id' for nil

Backtrace

app/controllers/quiz/answers_controller.rb:38:in 'Quiz::AnswersController#new'

Request

Name Quiz::AnswersController#new
Method GET
URL https://www.corriges-bac.fr/quiz/new
Browser FirefoxFirefox 149

Parameters

{
  "action": "new",
  "controller": "quiz/answers"
}

Headers

Te trailers
Dnt 1
Host www.corriges-bac.fr
Accept text/html, application/xhtml+xml
Referer https://www.corriges-bac.fr/
Sec-Gpc 1
Priority u=5
User-Agent Mozilla/5.0 (X11; Linux x86_64; rv:149.0) Gecko/20100101 Firefox/149.0
X-Request-Id c9c5b5fd-b854-41b2-96fa-a74a9880fe1c
X-Sec-Purpose prefetch
Sec-Fetch-Dest empty
Sec-Fetch-Mode cors
Sec-Fetch-Site same-origin
X-Kamal-Target fbc745e113f3:80
Accept-Encoding gzip, deflate, br, zstd
Accept-Language fr-FR,en-US;q=0.9,en;q=0.8
X-Forwarded-For 86.253.18.50, 172.18.0.2
X-Request-Start t=1781264846172
X-Sendfile-Type X-Sendfile
X-Forwarded-Host www.corriges-bac.fr
X-Forwarded-Proto https
X-Turbo-Request-Id b28d31e4-e01a-4965-9780-5e23bd7ad681

Context

controller
#<Quiz::AnswersController:0x00007fa6032317d8>

Environment

os Linux 6.8.0-71-generic
cwd /rails
pid 21
host 167.99.45.48-32a937f94091
ruby ruby 4.0.1 (2026-01-13 revision e04267a14b) +YJIT +PRISM [x86_64-linux]
rails 8.1.2
revision 9f20320606cc0bba070364a5ff8a7ff82135e395

Server

Load CPU RAM Swap Disk
167.99.45.48-32a937f94091 Load avg 7% CPU 7% RAM 45% Swap <1% Disk 13%

Deployments 4

a0b61dd16930586cbda9e62aa235c6d73f95ddbf 12 Jun 17:37
9f20320606cc0bba070364a5ff8a7ff82135e395 12 Jun 11:43
ab2db0ef0e403afb38bdcbee1ecdabca6a1d6b34 10 Jun 10:34
8336920e1dc9bdcbdb5958d5705989b7ce483108 10 Jun 09:41