{"issue":{"created_at":"2011-12-07T20:54:33Z","state":"closed","updated_at":"2011-12-07T21:44:59Z","user":{"gravatar_id":"79b1b001d5ff186c9bd02e7487aa4142","id":152152,"url":"https://api.github.com/users/derekprior","login":"derekprior","avatar_url":"https://secure.gravatar.com/avatar/79b1b001d5ff186c9bd02e7487aa4142?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png"},"comments":1,"body":"The output from the call to `object.destroy` is cast aside when determining whether to respond with success or failure. It seems that the only thing driving this decision is `object.errors.empty?` (see https://github.com/josevalim/inherited_resources/blob/master/lib/inherited_resources/base_helpers.rb#L252).\r\n\r\nDestroy can fail while errors is non-empty. For instance, a `before_destroy` callback may return `false`. In this case, inherited resources will think the call succeeded because errors is empty.\r\n\r\nShouldn't `respond_with_dual_blocks` also take into consideration the return value from `destroy` (or any operation, really)? Or is it simply poor style to ever fail a delete/write operation without adding to `object.errors`?","assignee":null,"number":185,"pull_request":{"patch_url":null,"html_url":null,"diff_url":null},"id":2479926,"labels":[],"title":"Destroy reports success when the action fails","html_url":"https://github.com/josevalim/inherited_resources/issues/185","closed_at":"2011-12-07T21:44:59Z","url":"https://api.github.com/repos/josevalim/inherited_resources/issues/185","milestone":null},"action":"closed"}