Skip to content
Browse files

Make Source -> Dep -> Run dependent.

  • Loading branch information...
1 parent 5c1d844 commit f855c4ec03e28c247ddd378644ddf966ef80d116 @benhoskings committed
Showing with 2 additions and 2 deletions.
  1. +1 −1 app/models/dep.rb
  2. +1 −1 app/models/source.rb
View
2 app/models/dep.rb
@@ -2,7 +2,7 @@ class Dep < ActiveRecord::Base
belongs_to :source
- has_many :runs
+ has_many :runs, :dependent => :destroy
validates_presence_of :source, :name
validates_uniqueness_of :name, :scope => :source_id
View
2 app/models/source.rb
@@ -1,6 +1,6 @@
class Source < ActiveRecord::Base
- has_many :deps
+ has_many :deps, :dependent => :destroy
validates_presence_of :uri
validates_uniqueness_of :uri

0 comments on commit f855c4e

Please sign in to comment.
Something went wrong with that request. Please try again.