Skip to content

Handling :dependent => :nullify #44

@JohnKacz

Description

@JohnKacz

So looking at how revive_destroyed_dependent_records works it seems there is no way currently to restore the association to nullified dependents. Correct?

Could this be handled by checking for :nullify in get_dependent_records and then if the dependent class has a column dead_[association]id moving the id to to that column and then going ahead and nullifying the records? This would then follow that revive would look for the dead[association]_id column and reverse the operation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions