From 53fe84fbef321f383cf030b99ab3401663d637e1 Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Mon, 23 Apr 2012 21:30:41 +0100 Subject: [PATCH] Delete tokens for an application when the application is deleted --- app/models/client_application.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/client_application.rb b/app/models/client_application.rb index b1f402292..9a074fb30 100644 --- a/app/models/client_application.rb +++ b/app/models/client_application.rb @@ -2,7 +2,7 @@ require 'oauth' class ClientApplication < ActiveRecord::Base belongs_to :user - has_many :tokens, :class_name => "OauthToken" + has_many :tokens, :class_name => "OauthToken", :dependent => :delete_all has_many :access_tokens has_many :oauth2_verifiers has_many :oauth_tokens -- 2.43.2