A team member just found the following out about an inconsistency in the Rails documentation. Although:
indicates for the dependent option: “When no option is given, the behaviour is to do nothing with the associated records when destroying a record.”
Which is consistent with the behavior, but in:
(in the rdoc for associations), it states: “The default strategy is :nullify (set the foreign keys to nil), except for has_many :through, where the default strategy is delete_all (delete the join records, without running their callbacks).”
In addition, that might be helpful to mention somewhere in guides/source/upgrading_ruby_on_rails.md?
I’m not sure how to summarize/clarify that behavior at the moment in associations.rb (would just removing the sentence about the default strategy be ok?) or in which places “dependent: :nullify” should be added to models to ensure similar behavior from Rails 3 to 4 for the upgrade doc. Any ideas?
I’m new here, but I believe you should open an issue over at github. Then people could reference it for possible pull requests + it would be more visible if somebody searches for it.