On Jul 28, 2006, at 8:29 PM, Daniel N wrote:
Just a thought tho. By raising an exception, this would put
destroy into a different category, this should perhaps be destroy!
to fit with the other methods that raise errors.
Good call. Really, destroy_with_callbacks should rollback the
transaction when a before_destroy callback is false rather than
returning false and committing. Then the implementation simplifies
back to
case reflection.options[:dependent]
when :restrict
class_eval "before_destroy { |model| model.#
{reflection.name}.blank? }"
jeremy
_______________________________________________
Rails-core mailing list
Rails-core@lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails-core