{"action":"created","issue":{"url":"https://api.github.com/repos/thoughtbot/paperclip/issues/1876","labels_url":"https://api.github.com/repos/thoughtbot/paperclip/issues/1876/labels{/name}","comments_url":"https://api.github.com/repos/thoughtbot/paperclip/issues/1876/comments","events_url":"https://api.github.com/repos/thoughtbot/paperclip/issues/1876/events","html_url":"https://github.com/thoughtbot/paperclip/issues/1876","id":81670781,"number":1876,"title":".present? relies on a file_name being present. Not enough","user":{"login":"mehulkar","id":490968,"avatar_url":"https://avatars.githubusercontent.com/u/490968?v=3","gravatar_id":"","url":"https://api.github.com/users/mehulkar","html_url":"https://github.com/mehulkar","followers_url":"https://api.github.com/users/mehulkar/followers","following_url":"https://api.github.com/users/mehulkar/following{/other_user}","gists_url":"https://api.github.com/users/mehulkar/gists{/gist_id}","starred_url":"https://api.github.com/users/mehulkar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mehulkar/subscriptions","organizations_url":"https://api.github.com/users/mehulkar/orgs","repos_url":"https://api.github.com/users/mehulkar/repos","events_url":"https://api.github.com/users/mehulkar/events{/privacy}","received_events_url":"https://api.github.com/users/mehulkar/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-05-27T23:30:50Z","updated_at":"2015-05-29T19:10:21Z","closed_at":"2015-05-27T23:48:17Z","body":"I ran into a bug in our app where we were updating the filename column, but accidentally deleting the underlying file (by assigning the paperclip property to nil). `Paperclip::Attachment#present?` still returns true even though the file doesn't exist. \r\n\r\nI propose changing the method to use `File.exists?` as well. "},"comment":{"url":"https://api.github.com/repos/thoughtbot/paperclip/issues/comments/106905694","html_url":"https://github.com/thoughtbot/paperclip/issues/1876#issuecomment-106905694","issue_url":"https://api.github.com/repos/thoughtbot/paperclip/issues/1876","id":106905694,"user":{"login":"jyurek","id":4632,"avatar_url":"https://avatars.githubusercontent.com/u/4632?v=3","gravatar_id":"","url":"https://api.github.com/users/jyurek","html_url":"https://github.com/jyurek","followers_url":"https://api.github.com/users/jyurek/followers","following_url":"https://api.github.com/users/jyurek/following{/other_user}","gists_url":"https://api.github.com/users/jyurek/gists{/gist_id}","starred_url":"https://api.github.com/users/jyurek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jyurek/subscriptions","organizations_url":"https://api.github.com/users/jyurek/orgs","repos_url":"https://api.github.com/users/jyurek/repos","events_url":"https://api.github.com/users/jyurek/events{/privacy}","received_events_url":"https://api.github.com/users/jyurek/received_events","type":"User","site_admin":false},"created_at":"2015-05-29T19:10:21Z","updated_at":"2015-05-29T19:10:21Z","body":"As mentioned in #1877, if you actually want to see if the file exists, use `exists?`."}}