Changed refrences to query id from `id` to `self[:id]`

Fixes "wrong Id sent to the navigation links."