Skip to content

Commit

Permalink
Merge pull request maxdemarzi#131 from blizkreeg/dev
Browse files Browse the repository at this point in the history
added delete callback for destroy
  • Loading branch information
blizkreeg committed Mar 21, 2014
2 parents f2df348 + cdea867 commit 183ec66
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/deja/relationship.rb
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,10 @@ def update!(opts = {})
end

def destroy
Deja::Query.delete_relationship(@id) if @id
@id = nil
run_callbacks :delete do
Deja::Query.delete_relationship(@id) if @id
@id = nil
end
true
end

Expand Down

0 comments on commit 183ec66

Please sign in to comment.