NoMethodError in ShelfController#edit

undefined method `id' for nil:NilClass

Extracted source (around line #604):
602
603
604
605
606
607
              
p shelf
p book
Entry.where("shelf_id = ? and book_id = ?", shelf.id, book.id)[0]
end
def add_checksum(isbn)

Rails.root: /app

Application Trace | Framework Trace | Full Trace

Request

Parameters:

{"shelfname"=>"vOVoSJmU2p5xAhTKoUGspBPeSKruA2DY", "isbn"=>"4560047642"}

Response

Headers:

None