changes resource: <documents> to <document> and root: <document> to <documents> in routes.rb