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"=>"akizo_mickey", "isbn"=>"4532167175"}

Response

Headers:

None