Fix 404 error while displaying json files.

It uses params[:id] instead of request.fullpath.
It should fix #3132.
Merge branch 'fix-404-json-file' of https://github.com/hiroponz/gitlabhq into hiroponz-fix-404-json-file
move edit to separate controller. This fixes #3265
Merge branch 'hiroponz-fix-404-json-file'