NoMethodError in Staffs#show

Showing /opt/soty/app/views/staffs/show.html.slim where line #3 raised:

undefined method `id' for nil:NilClass
Extracted source (around line #3):
1
2
3
4
5
6
              
head
- content_for :canonical do
link rel="canonical" href="#{request.base_url}/staffs/#{@staff.id}"
- provide(:title, staff_detail_og_title)
- provide(:description, staff_detail_og_description)
- provide(:image, staff_detail_og_image)

Rails.root: /opt/soty

Application Trace | Framework Trace | Full Trace

Request

Parameters:

{"id"=>"839"}

Response

Headers:

None