Method for checking if an object can be destroyed based on its dependent restrict associations

9 views
Skip to first unread message

Santiago Palladino

unread,
Jan 31, 2012, 10:05:33 AM1/31/12
to Ruby on Rails: Core
I have added a small method for checking if an object can be destroyed
by checking if its associations marked as dependent restrict are empty
or not. Since it seems something common to do, I wanted to ask if you
think it is worth adding it to ActiveRecord, in which case I can fork
it and add the change (as well as tests and doc), as described in
http://guides.rubyonrails.org/contributing_to_ruby_on_rails.html

The gist for the monkeypatch I am doing now in the app is
https://gist.github.com/1710839

My apologies if this is not the appropriate channel for discussing
this. If it is not, I would appreciate some advice regarding where to
ask this question or how to proceed.

Thanks!

Reply all
Reply to author
Forward
0 new messages