11175
(-- --)
1
Hello!
My problem is my :dependent => :destroy do not call the destroy method.
Why is it so?
Any sugesstions.
class Comment
belongs_to :commentable, :polymorphic => true,
end
class Article
has_many :comments, :as => 'commentable', :dependent => :destroy
end
In my opinion:
If you call delete method, then it will not call destroy method,
if you call destroy method, it will call destroy method.
i.e.
Article.destroy
it is the discrepancy between delete and destroy method.
Mikael Björkegren wrote:
In my opinion:
If you call delete method, then it will not call destroy method,
if you call destroy method, it will call destroy method.
i.e.
Article.destroy
it is the discrepancy between delete and destroy method.
11175
(-- --)
4
Thanks for your reply.
But it do not call my destroy method for Comment, but it removes it
Eric.Archangel wrote: