1
0
Fork 0

Models delete dependencies

This commit is contained in:
magnolia-fan 2011-06-20 18:32:08 +04:00
parent e6b8ebfde0
commit 7dbf6b87cc
2 changed files with 2 additions and 2 deletions

View File

@ -1,4 +1,4 @@
class Album < ActiveRecord::Base class Album < ActiveRecord::Base
belongs_to :artist belongs_to :artist
has_many :tracks, :order => 'bonus ASC, position ASC' has_many :tracks, :order => 'bonus ASC, position ASC', :dependent => :destroy
end end

View File

@ -1,3 +1,3 @@
class Artist < ActiveRecord::Base class Artist < ActiveRecord::Base
has_many :albums, :order => 'year ASC, id ASC' has_many :albums, :order => 'year ASC, id ASC', :dependent => :destroy
end end