Skip to content

Adds #really_destroyed? method to work as default rails #destroyed?#128

Merged
radar merged 1 commit into
rubysherpas:rails3from
yratanov:really_destroyed
May 5, 2014
Merged

Adds #really_destroyed? method to work as default rails #destroyed?#128
radar merged 1 commit into
rubysherpas:rails3from
yratanov:really_destroyed

Conversation

@yratanov
Copy link
Copy Markdown

Paranoia gem reimplements #destroyed? method to check only paranoia_column presence. But sometimes we need to make sure record is going through real destroy process.
For example if we have attached file and we want to destroy it only on real destroy:

after_destroy :remove_attachments, if: :really_destroyed?

New method #really_destroyed? added to check if model destroyed completely.

radar added a commit that referenced this pull request May 5, 2014
Adds #really_destroyed? method to work as default rails #destroyed?
@radar radar merged commit b7714ec into rubysherpas:rails3 May 5, 2014
@radar
Copy link
Copy Markdown
Collaborator

radar commented May 5, 2014

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants