last day (15 days later) » 

11:00 PM
hello
 
Hey there
 
So I take it that solution didn't work?
 
I just discovered that also simply deleting the comment throws the same error
No :/
i can get whats wrong
i have include PublicActivity::Common in my Model to manually create the activities
I create the activity by
@comment.create_activity :create, owner: current_user, recipient: @comment.screen.user
 
oh.. so you're using it as a notification stream
??
 
yap
i followed the Railscast
 
11:03 PM
so who deletes the comment. The original commenter or the current_user
 
the original commenter
 
I thought the railscast was for an activity stream and didn't include a recipient
 
No no, it includes
 
ok. so the original_commenter would be the current_user then
 
Only if he's the one created the comment
Oh
wait
it works
:o
IT WORKS
but i have no idea why
 
11:07 PM
cool.

well it should work because, :dependent :destroy doesn't call the destroy method in your controller it just just the default ruby destroy method which destroy's the associated record
 
Well
but it was the same code
just this time in the model
what could that change ?
 
calling the before_destroy method overrides the default ruby destroy method.
the destroy method in the controller is only called when a user manually deletes a comment from the view
 
Right
Well
Thank you a LOT !!!
accepted your answer already
thanks for you time
 
cool. no problem.

Are you still confused as to why it works like that?
 
I got it
i'm just trying to figure this out so many hours now
that i changed so much code here and there
that i need to sleep first
and give it a clear minded look tomorrow :)
 
11:10 PM
Ya, I hate that! Happens to me all the time.
 
+1
Well if i have any question's tomorrow, i will leave you a comment
on your answer
Well, after this huge headache is gone, I will escort myself to bed :) Thanks a lot again... see ya arroun
around
 

last day (15 days later) »