documents_controller.rb gives 'undefined method 'name' for #<Document:0x007fc5bcf61da8>'